Skip to content

Commit 2634f24

Browse files
---
yaml --- r: 313215 b: refs/heads/tensorflow-merge c: ba597a0 h: refs/heads/master i: 313213: 2e26a5f 313211: 460a614 313207: 7f77975 313199: 876c009 313183: c342668 313151: e001a2e 313087: 0deff4b
1 parent 8da9bd0 commit 2634f24

File tree

320 files changed

+3162
-5229
lines changed

Some content is hidden

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

320 files changed

+3162
-5229
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ refs/heads/chase-my-tail: 8bb91443a9e81bbfac92a2621a0af887a1da8dbf
13791379
refs/heads/consider-outer-alternatives: 708bac749ec60a22a79e2eefbe734f9488a7370d
13801380
refs/heads/revert-25740-oops-i-linked-it-again: fdd41aeb682fc488572bdc1cf71b2ff6997ba576
13811381
refs/heads/swift-5.1-branch-06-12-2019: e63b7b2d3b93c48232d386099d0ec525d21d8f8d
1382-
refs/heads/tensorflow-merge: 51fbf0c34d2f06c5f898bd9f06e0d661082e1dea
1382+
refs/heads/tensorflow-merge: ba597a02b9d96f54c429266bf6b348e671ed0d24
13831383
refs/heads/update-checkout-sha-info: 5832743c5c2a842976c42a508a4c6dcceefb0aef
13841384
refs/tags/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-12-a: 228f0448d9bb909aacbba4afcb7c600a405d15da
13851385
refs/tags/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-14-a: 922861a77b5fc2bf46bc917da70ceb15eef76836

branches/tensorflow-merge/CHANGELOG.md

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,27 @@ CHANGELOG
2626
Swift Next
2727
----------
2828

29-
* [SR-4206][]:
29+
* [SR-8974][]:
3030

31-
A method override is no longer allowed to have a generic signature with
32-
requirements not imposed by the base method. For example:
31+
Duplicate tuple element labels are no longer allowed, because it leads
32+
to incorrect behavior. For example:
3333

3434
```
35-
protocol P {}
36-
37-
class Base {
38-
func foo<T>(arg: T) {}
39-
}
40-
41-
class Derived: Base {
42-
override func foo<T: P>(arg: T) {}
43-
}
35+
let dupLabels: (foo: Int, foo: Int) = (foo: 1, foo: 2)
36+
37+
enum Foo { case bar(x: Int, x: Int) }
38+
let f: Foo = .bar(x: 0, x: 1)
4439
```
4540

46-
will now be diagnosed as an error.
41+
will now be diagnosed as an error.
42+
43+
Note: You can still use duplicate labels when declaring functions and
44+
subscripts, as long as the internal labels are different. For example:
45+
46+
```
47+
func foo(bar x: Int, bar y: Int) {}
48+
subscript(a x: Int, a y: Int) -> Int {}
49+
```
4750

4851
* [SR-6118][]:
4952

@@ -65,28 +68,6 @@ Swift Next
6568
Swift 5.1
6669
---------
6770

68-
* [SR-8974][]:
69-
70-
Duplicate tuple element labels are no longer allowed, because it leads
71-
to incorrect behavior. For example:
72-
73-
```
74-
let dupLabels: (foo: Int, foo: Int) = (foo: 1, foo: 2)
75-
76-
enum Foo { case bar(x: Int, x: Int) }
77-
let f: Foo = .bar(x: 0, x: 1)
78-
```
79-
80-
will now be diagnosed as an error.
81-
82-
Note: You can still use duplicate argument labels when declaring functions and
83-
subscripts, as long as the internal parameter names are different. For example:
84-
85-
```
86-
func foo(bar x: Int, bar y: Int) {}
87-
subscript(a x: Int, a y: Int) -> Int {}
88-
```
89-
9071
* [SE-0244][]:
9172

9273
Functions can now hide their concrete return type by declaring what protocols
@@ -7727,7 +7708,6 @@ Swift 1.0
77277708
[SR-2608]: <https://bugs.swift.org/browse/SR-2608>
77287709
[SR-2672]: <https://bugs.swift.org/browse/SR-2672>
77297710
[SR-2688]: <https://bugs.swift.org/browse/SR-2688>
7730-
[SR-4206]: <https://bugs.swift.org/browse/SR-4206>
77317711
[SR-4248]: <https://bugs.swift.org/browse/SR-4248>
77327712
[SR-5581]: <https://bugs.swift.org/browse/SR-5581>
77337713
[SR-5719]: <https://bugs.swift.org/browse/SR-5719>

branches/tensorflow-merge/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Please make sure you use Python 2.x. Python 3.x is not supported currently.
7676

7777
#### macOS
7878

79-
To build for macOS, you need [Xcode 11 beta 4](https://developer.apple.com/xcode/downloads/).
79+
To build for macOS, you need [Xcode 11 beta](https://developer.apple.com/xcode/downloads/).
8080
The required version of Xcode changes frequently, and is often a beta release.
8181
Check this document or the host information on <https://ci.swift.org> for the
8282
current required version.

branches/tensorflow-merge/benchmark/Package.swift

Lines changed: 26 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.0
1+
// swift-tools-version:4.2
22

33
import PackageDescription
44
import Foundation
@@ -9,15 +9,10 @@ unsupportedTests.insert("ObjectiveCBridging")
99
unsupportedTests.insert("ObjectiveCBridgingStubs")
1010
#endif
1111

12-
//===---
13-
// Single Source Libraries
14-
//
15-
16-
/// Return the source files in subDirectory that we will translate into
17-
/// libraries. Each source library will be compiled as its own module.
18-
func getSingleSourceLibraries(subDirectory: String) -> [String] {
12+
// This is a stop gap hack so we can edit benchmarks in Xcode.
13+
let singleSourceLibraries: [String] = {
1914
let f = FileManager.`default`
20-
let dirURL = URL(fileURLWithPath: subDirectory)
15+
let dirURL = URL(fileURLWithPath: "single-source").absoluteURL
2116
let fileURLs = try! f.contentsOfDirectory(at: dirURL,
2217
includingPropertiesForKeys: nil)
2318
return fileURLs.compactMap { (path: URL) -> String? in
@@ -30,45 +25,27 @@ func getSingleSourceLibraries(subDirectory: String) -> [String] {
3025
return nil
3126
}
3227

33-
let name = String(c[0])
28+
let s = String(c[0])
3429

3530
// We do not support this test.
36-
if unsupportedTests.contains(name) {
31+
if unsupportedTests.contains(s) {
3732
return nil
3833
}
3934

40-
return name
35+
assert(s != "PrimsSplit")
36+
return s
4137
}
42-
}
43-
44-
var singleSourceLibraryDirs: [String] = []
45-
singleSourceLibraryDirs.append("single-source")
46-
47-
var singleSourceLibraries: [String] = singleSourceLibraryDirs.flatMap {
48-
getSingleSourceLibraries(subDirectory: $0)
49-
}
38+
}()
5039

51-
//===---
52-
// Multi Source Libraries
53-
//
54-
55-
func getMultiSourceLibraries(subDirectory: String) -> [(String, String)] {
40+
let multiSourceLibraries: [String] = {
5641
let f = FileManager.`default`
57-
let dirURL = URL(string: subDirectory)!
58-
let subDirs = try! f.contentsOfDirectory(at: dirURL, includingPropertiesForKeys: nil)
59-
return subDirs.map { (subDirectory, $0.lastPathComponent) }
60-
}
61-
62-
var multiSourceLibraryDirs: [String] = []
63-
multiSourceLibraryDirs.append("multi-source")
64-
65-
var multiSourceLibraries: [(parentSubDir: String, name: String)] = multiSourceLibraryDirs.flatMap {
66-
getMultiSourceLibraries(subDirectory: $0)
67-
}
68-
69-
//===---
70-
// Products
71-
//
42+
let dirURL = URL(fileURLWithPath: "multi-source").absoluteURL
43+
let fileURLs = try! f.contentsOfDirectory(at: dirURL,
44+
includingPropertiesForKeys: nil)
45+
return fileURLs.map { (path: URL) -> String in
46+
return path.lastPathComponent
47+
}
48+
}()
7249

7350
var products: [Product] = []
7451
products.append(.library(name: "TestsUtils", type: .static, targets: ["TestsUtils"]))
@@ -77,15 +54,9 @@ products.append(.library(name: "DriverUtils", type: .static, targets: ["DriverUt
7754
products.append(.library(name: "ObjectiveCTests", type: .static, targets: ["ObjectiveCTests"]))
7855
#endif
7956
products.append(.executable(name: "SwiftBench", targets: ["SwiftBench"]))
80-
57+
products.append(.library(name: "PrimsSplit", type: .static, targets: ["PrimsSplit"]))
8158
products += singleSourceLibraries.map { .library(name: $0, type: .static, targets: [$0]) }
82-
products += multiSourceLibraries.map {
83-
return .library(name: $0.name, type: .static, targets: [$0.name])
84-
}
85-
86-
//===---
87-
// Targets
88-
//
59+
products += multiSourceLibraries.map { .library(name: $0, type: .static, targets: [$0]) }
8960

9061
var targets: [Target] = []
9162
targets.append(.target(name: "TestsUtils", path: "utils", sources: ["TestsUtils.swift"]))
@@ -102,7 +73,7 @@ swiftBenchDeps.append(.target(name: "ObjectiveCTests"))
10273
#endif
10374
swiftBenchDeps.append(.target(name: "DriverUtils"))
10475
swiftBenchDeps += singleSourceLibraries.map { .target(name: $0) }
105-
swiftBenchDeps += multiSourceLibraries.map { .target(name: $0.name) }
76+
swiftBenchDeps += multiSourceLibraries.map { .target(name: $0) }
10677

10778
targets.append(
10879
.target(name: "SwiftBench",
@@ -121,27 +92,20 @@ var singleSourceDeps: [Target.Dependency] = [.target(name: "TestsUtils")]
12192
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
12293
singleSourceDeps.append(.target(name: "ObjectiveCTests"))
12394
#endif
124-
125-
targets += singleSourceLibraries.map { name in
126-
return .target(name: name,
95+
targets += singleSourceLibraries.map { x in
96+
return .target(name: x,
12797
dependencies: singleSourceDeps,
12898
path: "single-source",
129-
sources: ["\(name).swift"])
99+
sources: ["\(x).swift"])
130100
}
131-
132-
targets += multiSourceLibraries.map { lib in
133-
return .target(
134-
name: lib.name,
101+
targets += multiSourceLibraries.map { x in
102+
return .target(name: x,
135103
dependencies: [
136104
.target(name: "TestsUtils")
137105
],
138-
path: lib.parentSubDir)
106+
path: "multi-source/\(x)")
139107
}
140108

141-
//===---
142-
// Top Level Definition
143-
//
144-
145109
let p = Package(
146110
name: "swiftbench",
147111
products: products,

0 commit comments

Comments
 (0)