Skip to content

Commit ca6b861

Browse files
committed
---
yaml --- r: 293758 b: refs/heads/tensorflow c: d2a47db h: refs/heads/master
1 parent c79a1cb commit ca6b861

File tree

200 files changed

+1041
-2560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+1041
-2560
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819-
refs/heads/tensorflow: d7856dc3b7d96045364ae531fc70853c5b40a5da
819+
refs/heads/tensorflow: d2a47db71aa57c33feb29001a3428ba8812b9078
820820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/benchmark/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ set(SWIFT_BENCH_MODULES
4343
single-source/BinaryFloatingPointProperties
4444
single-source/BitCount
4545
single-source/Breadcrumbs
46-
single-source/BucketSort
4746
single-source/ByteSwap
4847
single-source/COWTree
4948
single-source/COWArrayGuaranteedParameterOverhead

branches/tensorflow/benchmark/single-source/BucketSort.swift

Lines changed: 0 additions & 139 deletions
This file was deleted.

branches/tensorflow/benchmark/utils/TestsUtils.swift

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,29 @@ public func Random() -> Int64 {
221221
return lfsrRandomGenerator.randInt()
222222
}
223223

224+
// This is a fixed-increment version of Java 8's SplittableRandom generator.
225+
// It is a very fast generator passing BigCrush, with 64 bits of state.
226+
// See http://dx.doi.org/10.1145/2714064.2660195 and
227+
// http://docs.oracle.com/javase/8/docs/api/java/util/SplittableRandom.html
228+
//
229+
// Derived from public domain C implementation by Sebastiano Vigna
230+
// See http://xoshiro.di.unimi.it/splitmix64.c
231+
public struct SplitMix64: RandomNumberGenerator {
232+
private var state: UInt64
233+
234+
public init(seed: UInt64) {
235+
self.state = seed
236+
}
237+
238+
public mutating func next() -> UInt64 {
239+
self.state &+= 0x9e3779b97f4a7c15
240+
var z: UInt64 = self.state
241+
z = (z ^ (z &>> 30)) &* 0xbf58476d1ce4e5b9
242+
z = (z ^ (z &>> 27)) &* 0x94d049bb133111eb
243+
return z ^ (z &>> 31)
244+
}
245+
}
246+
224247
@inlinable // FIXME(inline-always)
225248
@inline(__always)
226249
public func CheckResults(

branches/tensorflow/benchmark/utils/main.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import BinaryFloatingPointConversionFromBinaryInteger
3131
import BinaryFloatingPointProperties
3232
import BitCount
3333
import Breadcrumbs
34-
import BucketSort
3534
import ByteSwap
3635
import COWTree
3736
import COWArrayGuaranteedParameterOverhead
@@ -200,7 +199,6 @@ registerBenchmark(BinaryFloatingPointPropertiesNextUp)
200199
registerBenchmark(BinaryFloatingPointPropertiesUlp)
201200
registerBenchmark(BitCount)
202201
registerBenchmark(Breadcrumbs)
203-
registerBenchmark(BucketSort)
204202
registerBenchmark(ByteSwap)
205203
registerBenchmark(COWTree)
206204
registerBenchmark(COWArrayGuaranteedParameterOverhead)

branches/tensorflow/include/swift/AST/Decl.h

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3058,22 +3058,14 @@ class AssociatedTypeDecl : public AbstractTypeParamDecl {
30583058
return cast<ProtocolDecl>(getDeclContext());
30593059
}
30603060

3061-
/// Check if we have a default definition type.
3062-
bool hasDefaultDefinitionType() const {
3063-
// If we have a TypeRepr, return true immediately without kicking off
3064-
// a request.
3065-
return !DefaultDefinition.isNull() || getDefaultDefinitionType();
3066-
}
3067-
30683061
/// Retrieve the default definition type.
3069-
Type getDefaultDefinitionType() const;
3070-
3071-
TypeLoc &getDefaultDefinitionLoc() {
3072-
return DefaultDefinition;
3062+
Type getDefaultDefinitionType() const {
3063+
return getDefaultDefinitionLoc().getType();
30733064
}
30743065

3066+
TypeLoc &getDefaultDefinitionLoc();
30753067
const TypeLoc &getDefaultDefinitionLoc() const {
3076-
return DefaultDefinition;
3068+
return const_cast<AssociatedTypeDecl *>(this)->getDefaultDefinitionLoc();
30773069
}
30783070

30793071
/// Retrieve the trailing where clause for this associated type, if any.
@@ -3084,7 +3076,7 @@ class AssociatedTypeDecl : public AbstractTypeParamDecl {
30843076
TrailingWhere = trailingWhereClause;
30853077
}
30863078

3087-
/// Set the interface type of this associated type declaration to a dependent
3079+
/// Set the interface type of this associated type declaration to a dependen
30883080
/// member type of 'Self'.
30893081
void computeType();
30903082

branches/tensorflow/include/swift/AST/DiagnosticsParse.def

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -852,9 +852,10 @@ ERROR(parameter_specifier_as_attr_disallowed,none,
852852
"'%0' before a parameter name is not allowed, place it before the parameter type instead",
853853
(StringRef))
854854
ERROR(parameter_specifier_repeated,none,
855-
"parameter must not have multiple '__owned', 'inout', or '__shared' specifiers", ())
856-
WARNING(parameter_let_var_as_attr,none,
857-
"'%0' in this position is interpreted as an argument label",
855+
"parameter must not have multiple '__owned', 'inout', '__shared',"
856+
" 'var', or 'let' specifiers", ())
857+
ERROR(parameter_let_var_as_attr,none,
858+
"'%0' as a parameter attribute is not allowed",
858859
(StringRef))
859860

860861

branches/tensorflow/include/swift/AST/KnownIdentifiers.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ IDENTIFIER(type)
110110
IDENTIFIER(Value)
111111
IDENTIFIER(value)
112112
IDENTIFIER_WITH_NAME(value_, "_value")
113-
IDENTIFIER(WinSDK)
114113
IDENTIFIER(with)
115114
IDENTIFIER(withArguments)
116115
IDENTIFIER(withKeywordArguments)

branches/tensorflow/include/swift/AST/LazyResolver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ class alignas(void*) LazyMemberLoader {
159159
SmallVectorImpl<ProtocolConformance *> &Conformances) = 0;
160160

161161
/// Returns the default definition type for \p ATD.
162-
virtual Type loadAssociatedTypeDefault(const AssociatedTypeDecl *ATD,
163-
uint64_t contextData) = 0;
162+
virtual TypeLoc loadAssociatedTypeDefault(const AssociatedTypeDecl *ATD,
163+
uint64_t contextData) = 0;
164164

165165
/// Returns the generic environment.
166166
virtual GenericEnvironment *loadGenericEnvironment(const DeclContext *decl,

branches/tensorflow/include/swift/AST/Module.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,10 @@ class SourceFile final : public FileUnit {
983983
/// If not, we can fast-path module checks.
984984
bool HasImplementationOnlyImports = false;
985985

986+
/// The list of protocol conformances that were "used" within this
987+
/// source file.
988+
llvm::SetVector<NormalProtocolConformance *> UsedConformances;
989+
986990
/// The scope map that describes this source file.
987991
ASTScope *Scope = nullptr;
988992

@@ -1142,6 +1146,17 @@ class SourceFile final : public FileUnit {
11421146

11431147
virtual bool walk(ASTWalker &walker) override;
11441148

1149+
/// Note that the given conformance was used by this source file.
1150+
void addUsedConformance(NormalProtocolConformance *conformance) {
1151+
UsedConformances.insert(conformance);
1152+
}
1153+
1154+
/// Retrieve the set of conformances that were used in this source
1155+
/// file.
1156+
ArrayRef<NormalProtocolConformance *> getUsedConformances() const {
1157+
return UsedConformances.getArrayRef();
1158+
}
1159+
11451160
/// @{
11461161

11471162
/// Look up the given operator in this file.

branches/tensorflow/include/swift/Basic/Statistics.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ FRONTEND_STATISTIC(AST, NumPrefixOperators)
141141
/// Number of precedence groups in the AST context.
142142
FRONTEND_STATISTIC(AST, NumPrecedenceGroups)
143143

144+
/// Number of conformances used by code processed by this frontend job.
145+
FRONTEND_STATISTIC(AST, NumUsedConformances)
146+
144147
/// Number of full function bodies parsed.
145148
FRONTEND_STATISTIC(Parse, NumFunctionsParsed)
146149

branches/tensorflow/include/swift/Parse/Parser.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,6 @@ class Parser {
609609

610610
void skipUntilDeclRBrace(tok T1, tok T2);
611611

612-
void skipListUntilDeclRBrace(SourceLoc startLoc, tok T1, tok T2);
613-
614612
/// Skip a single token, but match parentheses, braces, and square brackets.
615613
///
616614
/// Note: this does \em not match angle brackets ("<" and ">")! These are

branches/tensorflow/include/swift/Parse/Token.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ class Token {
173173
return true;
174174
}
175175

176-
// inout cannot be used as an argument label.
177-
if (is(tok::kw_inout))
176+
// 'let', 'var', and 'inout' cannot be argument labels.
177+
if (isAny(tok::kw_let, tok::kw_var, tok::kw_inout))
178178
return false;
179179

180180
// All other keywords can be argument labels.

branches/tensorflow/include/swift/SIL/BridgedTypes.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ BRIDGING_KNOWN_TYPE(Swift, Error)
5353
BRIDGE_TYPE(ObjectiveC, ObjCBool, Swift, Bool, false)
5454
BRIDGE_TYPE(Darwin, DarwinBoolean, Swift, Bool, false)
5555

56-
BRIDGING_KNOWN_TYPE(WinSDK, WindowsBool)
57-
BRIDGE_TYPE(WinSDK, WindowsBool, Swift, Bool, false)
58-
5956
#undef BRIDGING_KNOWN_TYPE
6057
#undef BRIDGE_TYPE
6158

0 commit comments

Comments
 (0)