Skip to content

Commit f146e16

Browse files
authored
Merge pull request #9278 from practicalswift/gardening-20170504
2 parents 199c9ec + a9c0384 commit f146e16

File tree

11 files changed

+10
-20
lines changed

11 files changed

+10
-20
lines changed

benchmark/scripts/compare_perf_tests.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ def sd(self): # Standard Deviation (ms)
4343
return (0 if self.samples < 2 else
4444
sqrt(self.S_runtime / (self.samples - 1)))
4545

46-
@property
47-
def cv(self): # Coeficient of Variation (%)
48-
return self.sd / self.mean
49-
5046
# Compute running variance, B. P. Welford's method
5147
# See Knuth TAOCP vol 2, 3rd edition, page 232, or
5248
# https://www.johndcook.com/blog/standard_deviation/
@@ -299,7 +295,6 @@ def row(name, old, new, delta, speedup, speedup_color):
299295
name, old, new, delta, speedup_color, speedup)
300296

301297
def header(contents):
302-
# exit(contents)
303298
return self.HTML_HEADER_ROW.format(* contents)
304299

305300
def table(title, results, speedup_color):

benchmark/single-source/SortLargeExistentials.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- SortLettersInPlace.swift -----------------------------------------===//
1+
//===--- SortLargeExistentials.swift --------------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,9 +1167,6 @@ ERROR(string_interpolation_extra,none,
11671167
"extra tokens after interpolated string expression", ())
11681168

11691169
// Keypath expressions.
1170-
ERROR(expr_keypath_invalid_component,PointsToFirstBadToken,
1171-
"key path can only contain property, subscript, optional chaining, or "
1172-
"optional force-unwrapping components", ())
11731170
ERROR(expr_keypath_expected_lparen,PointsToFirstBadToken,
11741171
"expected '(' following '#keyPath'", ())
11751172
ERROR(expr_keypath_expected_property_or_type,PointsToFirstBadToken,

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2567,7 +2567,7 @@ ConstraintResult GenericSignatureBuilder::addConformanceRequirement(
25672567
return Type();
25682568
};
25692569

2570-
// An an inferred same-type requirement between the two type declarations
2570+
// An inferred same-type requirement between the two type declarations
25712571
// within this protocol or a protocol it inherits.
25722572
auto addInferredSameTypeReq = [&](TypeDecl *first, TypeDecl *second) {
25732573
Type firstType = formUnsubstitutedType(first);

lib/IDE/APIDigesterData.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ struct swift::ide::api::APIDiffItemStore::Implementation {
415415
APIDiffItem *Item = serializeDiffItem(Allocator,
416416
cast<llvm::yaml::MappingNode>(&*It));
417417
auto &Bag = Data[Item->getKey()];
418-
if(std::find_if(Bag.begin(), Bag.end(),
418+
if (std::find_if(Bag.begin(), Bag.end(),
419419
[&](APIDiffItem* I) { return *Item == *I; }) == Bag.end()) {
420420
Bag.push_back(Item);
421421
AllItems.push_back(Item);

lib/IRGen/LoadableByAddress.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,11 @@ static bool modifiableApply(ApplySite applySite, irgen::IRGenModule &Mod) {
433433
return false;
434434
}
435435
auto callee = applySite.getCallee();
436-
if (dyn_cast<ProjectBlockStorageInst>(callee)) {
436+
if (isa<ProjectBlockStorageInst>(callee)) {
437437
return false;
438438
} else if (LoadInst *instr = dyn_cast<LoadInst>(callee)) {
439439
auto loadedSrcValue = instr->getOperand();
440-
if (dyn_cast<ProjectBlockStorageInst>(loadedSrcValue)) {
440+
if (isa<ProjectBlockStorageInst>(loadedSrcValue)) {
441441
return false;
442442
}
443443
}
@@ -1877,7 +1877,7 @@ void LoadableByAddress::run() {
18771877
}
18781878
} else if (auto *SI = dyn_cast<StoreInst>(&I)) {
18791879
auto dest = SI->getDest();
1880-
if (dyn_cast<ProjectBlockStorageInst>(dest)) {
1880+
if (isa<ProjectBlockStorageInst>(dest)) {
18811881
storeToBlockStorageInstrs.insert(SI);
18821882
}
18831883
}

lib/Migrator/Migrator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- Migrator.cpp -----------------------------------------------------===////
1+
//===--- Migrator.cpp -----------------------------------------------------===//
22
// This source file is part of the Swift.org open source project
33
//
44
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors

lib/Migrator/SyntacticMigratorPass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ struct SyntacticMigratorPass::Implementation : public SourceEntityWalker {
316316
void handleFuncRename(ValueDecl *FD, Expr* FuncRefContainer, Expr *Arg) {
317317
bool IgnoreBase = false;
318318
if (auto View = getFuncRename(FD, IgnoreBase)) {
319-
if(!IgnoreBase) {
319+
if (!IgnoreBase) {
320320
ReferenceCollector Walker(FD);
321321
Walker.walk(FuncRefContainer);
322322
Editor.replace(Walker.Result, View.base());
@@ -337,7 +337,7 @@ struct SyntacticMigratorPass::Implementation : public SourceEntityWalker {
337337

338338
void handleFunctionCallToPropertyChange(ValueDecl *FD, Expr* FuncRefContainer,
339339
Expr *Arg) {
340-
for(auto *Item :getRelatedDiffItems(FD)) {
340+
for (auto *Item : getRelatedDiffItems(FD)) {
341341
if (auto *CD = dyn_cast<CommonDiffItem>(Item)) {
342342
switch (CD->DiffKind) {
343343
case NodeAnnotation::GetterToProperty: {

lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "llvm/Support/CommandLine.h"
2929
#include "llvm/Support/Compiler.h"
3030
#include "llvm/Support/Debug.h"
31-
#include "llvm/Support/CommandLine.h"
3231

3332
#ifdef SWIFT_SILOPTIMIZER_PASSMANAGER_DIMEMORYUSECOLLECTOR_H
3433
#error "Included non ownership header?!"

test/Interpreter/subclass_existentials_objc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- subclass_existentials.swift --------------------------------------===//
1+
//===--- subclass_existentials_objc.swift ---------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
// RUN: not %target-sil-opt %s
2-
// REQUIRES: asserts
32
enum l<V>:V

0 commit comments

Comments
 (0)