Skip to content

Commit 84a08d0

Browse files
authored
---
yaml --- r: 349281 b: refs/heads/master-next c: d1c87f3 h: refs/heads/master i: 349279: 7d92306
1 parent 7dd6283 commit 84a08d0

File tree

1,413 files changed

+86487
-68432
lines changed

Some content is hidden

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

1,413 files changed

+86487
-68432
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: f6547cc82814e8beebc761f58cd453f409a9fce6
3+
refs/heads/master-next: d1c87f3c936c41418ee93320e42d523b3f51b6df
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/CHANGELOG.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,89 @@ CHANGELOG
2626
Swift Next
2727
----------
2828

29+
* [SR-11298][]:
30+
31+
A class-constrained protocol extension, where the extended protocol does
32+
not impose a class constraint, will now infer the constraint implicitly.
33+
34+
```swift
35+
protocol Foo {}
36+
class Bar: Foo {
37+
var someProperty: Int = 0
38+
}
39+
40+
// Even though 'Foo' does not impose a class constraint, it is automatically
41+
// inferred due to the Self: Bar constraint.
42+
extension Foo where Self: Bar {
43+
var anotherProperty: Int {
44+
get { return someProperty }
45+
// As a result, the setter is now implicitly nonmutating, just like it would
46+
// be if 'Foo' had a class constraint.
47+
set { someProperty = newValue }
48+
}
49+
}
50+
```
51+
52+
As a result, this could lead to code that currently compiles today to throw an error.
53+
54+
```swift
55+
protocol Foo {
56+
var someProperty: Int { get set }
57+
}
58+
59+
class Bar: Foo {
60+
var someProperty = 0
61+
}
62+
63+
extension Foo where Self: Bar {
64+
var anotherProperty1: Int {
65+
get { return someProperty }
66+
// This will now error, because the protocol requirement
67+
// is implicitly mutating and the setter is implicitly
68+
// nonmutating.
69+
set { someProperty = newValue } // Error
70+
}
71+
}
72+
```
73+
74+
**Workaround**: Define a new mutable variable inside the setter that has a reference to `self`:
75+
76+
```swift
77+
var anotherProperty1: Int {
78+
get { return someProperty }
79+
set {
80+
var mutableSelf = self
81+
mutableSelf.someProperty = newValue // Okay
82+
}
83+
}
84+
```
85+
86+
* [SE-0253][]:
87+
88+
Values of types that declare `func callAsFunction` methods can be called
89+
like functions. The call syntax is shorthand for applying
90+
`func callAsFunction` methods.
91+
92+
```swift
93+
struct Adder {
94+
var base: Int
95+
func callAsFunction(_ x: Int) -> Int {
96+
return x + base
97+
}
98+
}
99+
var adder = Adder(base: 3)
100+
adder(10) // returns 13, same as `adder.callAsFunction(10)`
101+
```
102+
103+
* `func callAsFunction` argument labels are required at call sites.
104+
* Multiple `func callAsFunction` methods on a single type are supported.
105+
* `mutating func callAsFunction` is supported.
106+
* `func callAsFunction` works with `throws` and `rethrows`.
107+
* `func callAsFunction` works with trailing closures.
108+
29109
* [SR-4206][]:
30110

31-
A method override is no longer allowed to have a generic signature with
111+
A method override is no longer allowed to have a generic signature with
32112
requirements not imposed by the base method. For example:
33113

34114
```
@@ -65,6 +145,8 @@ Swift Next
65145
Swift 5.1
66146
---------
67147

148+
### 2019-09-20 (Xcode 11.0)
149+
68150
* [SR-8974][]:
69151

70152
Duplicate tuple element labels are no longer allowed, because it leads
@@ -7711,6 +7793,7 @@ Swift 1.0
77117793
[SE-0244]: <https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md>
77127794
[SE-0245]: <https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md>
77137795
[SE-0252]: <https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md>
7796+
[SE-0253]: <https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md>
77147797
[SE-0254]: <https://github.com/apple/swift-evolution/blob/master/proposals/0254-static-subscripts.md>
77157798

77167799
[SR-106]: <https://bugs.swift.org/browse/SR-106>
@@ -7741,3 +7824,4 @@ Swift 1.0
77417824
[SR-8974]: <https://bugs.swift.org/browse/SR-8974>
77427825
[SR-9043]: <https://bugs.swift.org/browse/SR-9043>
77437826
[SR-9827]: <https://bugs.swift.org/browse/SR-9827>
7827+
[SR-11298]: <https://bugs.swift.org/browse/SR-11298>

branches/master-next/CMakeLists.txt

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ set(SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
219219
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
220220
"Path to the directory that contains Swift tools that are executable on the build machine")
221221

222-
option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
222+
option(SWIFT_ENABLE_MODULE_INTERFACES
223223
"Generate .swiftinterface files alongside .swiftmodule files"
224224
TRUE)
225225

@@ -499,6 +499,18 @@ include(CMakePushCheckState)
499499

500500
print_versions()
501501

502+
include(SwiftSharedCMakeConfig)
503+
504+
# NOTE: We include this before SwiftComponents as it relies on some LLVM CMake
505+
# functionality.
506+
# Support building Swift as a standalone project, using LLVM as an
507+
# external library.
508+
if(SWIFT_BUILT_STANDALONE)
509+
swift_common_standalone_build_config(SWIFT)
510+
else()
511+
swift_common_unified_build_config(SWIFT)
512+
endif()
513+
502514
include(SwiftComponents)
503515
include(SwiftHandleGybSources)
504516
include(SwiftSetIfArchBitness)
@@ -527,16 +539,6 @@ if(NOT CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
527539
OUTPUT_STRIP_TRAILING_WHITESPACE)
528540
endif()
529541

530-
include(SwiftSharedCMakeConfig)
531-
532-
# Support building Swift as a standalone project, using LLVM as an
533-
# external library.
534-
if(SWIFT_BUILT_STANDALONE)
535-
swift_common_standalone_build_config(SWIFT)
536-
else()
537-
swift_common_unified_build_config(SWIFT)
538-
endif()
539-
540542
get_filename_component(SWIFT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} REALPATH)
541543
set(SWIFT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
542544
set(SWIFT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
@@ -994,6 +996,7 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
994996
-DCMAKE_CXX_COMPILER=${SWIFT_LIBDISPATCH_CXX_COMPILER}
995997
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
996998
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
999+
-DCMAKE_INSTALL_LIBDIR=lib
9971000
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
9981001
-DCMAKE_LINKER=${CMAKE_LINKER}
9991002
-DCMAKE_RANLIB=${CMAKE_RANLIB}
@@ -1051,6 +1054,7 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
10511054
else()
10521055
set(SOURCEKIT_RUNTIME_DIR lib)
10531056
endif()
1057+
add_dependencies(sourcekit-inproc BlocksRuntime dispatch)
10541058
swift_install_in_component(FILES
10551059
$<TARGET_FILE:dispatch>
10561060
$<TARGET_FILE:BlocksRuntime>

branches/master-next/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414

1515
| **OS** | **Architecture** | **Build** |
1616
|---|:---:|:---:|
17-
|**[Debian 9.1 (Raspberry Pi)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/armv7_debian_stretch.json)** | ARMv7 | [![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1)|
18-
|**[Fedora 27](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_fedora_27.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27)|
19-
|**[Ubuntu 16.04](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04)|
2017
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/ppc64le_ubuntu_16_04.json)** | PPC64LE |[![Build Status](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le)|
2118
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/aarch64_ubuntu_16.04.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64)|
2219
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | ARMv7 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android)|
2320
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64)|
24-
|**[Ubuntu 16.04 (TensorFlow)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow)|
25-
|**[macOS 10.13 (TensorFlow)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_macos_high_sierra_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow)|
26-
|**[Ubuntu 16.04 (TensorFlow with GPU)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow_gpu.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu)|
27-
|**[Debian 9.5](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_debian_9.5.json)** | x86_64 | [![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_5/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_5)|
2821
|**[Windows 2019](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_windows_2019.json)** | x86_64 | [![Build Status](https://ci-external.swift.org/job/oss-swift-windows-x86_64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-windows-x86_64)|
2922

23+
**Swift TensorFlow Community-Hosted CI Platforms**
24+
25+
| **OS** | **Architecture** | **Build** |
26+
|---|:---:|:---:|
27+
|**[Ubuntu 16.04](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow)|
28+
|**[macOS 10.13](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_macos_high_sierra_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow)|
29+
|**[Ubuntu 16.04 (GPU)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow_gpu.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu)|
3030

3131
## Welcome to Swift
3232

branches/master-next/apinotes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ add_custom_target("copy_apinotes" ALL
2626
COMMENT "Copying API notes to ${output_dir}"
2727
SOURCES "${sources}")
2828

29+
add_dependencies(compiler copy_apinotes)
2930
swift_install_in_component(DIRECTORY "${output_dir}"
3031
DESTINATION "lib/swift/"
3132
COMPONENT compiler)

branches/master-next/benchmark/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ set(SWIFT_BENCH_MODULES
8787
single-source/Exclusivity
8888
single-source/ExistentialPerformance
8989
single-source/Fibonacci
90+
single-source/FindStringNaive
9091
single-source/FlattenList
9192
single-source/FloatingPointParsing
9293
single-source/FloatingPointPrinting
@@ -130,6 +131,7 @@ set(SWIFT_BENCH_MODULES
130131
single-source/Prefix
131132
single-source/PrefixWhile
132133
single-source/Prims
134+
single-source/PrimsNonStrongRef
133135
single-source/ProtocolDispatch
134136
single-source/ProtocolDispatch2
135137
single-source/Queue
@@ -151,6 +153,7 @@ set(SWIFT_BENCH_MODULES
151153
single-source/SetTests
152154
single-source/SevenBoom
153155
single-source/Sim2DArray
156+
single-source/SortArrayInClass
154157
single-source/SortIntPyramids
155158
single-source/SortLargeExistentials
156159
single-source/SortLettersInPlace

branches/master-next/benchmark/README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,17 @@ The following build options are available:
7070

7171
The following build targets are available:
7272

73-
1. `swift-benchmark-macosx-x86_64`
74-
2. `swift-benchmark-iphoneos-arm64`
75-
3. `swift-benchmark-iphoneos-armv7`
76-
4. `swift-benchmark-appletvos-arm64`
77-
5. `swift-benchmark-watchos-armv7k`
73+
* `swift-benchmark-macosx-x86_64`
74+
* `swift-benchmark-iphoneos-arm64`
75+
* `swift-benchmark-iphoneos-armv7`
76+
* `swift-benchmark-appletvos-arm64`
77+
* `swift-benchmark-watchos-armv7k`
7878

7979
Build steps (with example options):
8080

81-
1. `$ cd benchmark`
82-
2. `$ mkdir build`
83-
3. `$ cd build`
84-
4. `$ cmake ../benchmark -G Ninja -DSWIFT_EXEC=[path to built swiftc]`
85-
5. `$ ninja swift-benchmark-macosx-x86_64`
81+
1. `$ mkdir build; cd build`
82+
2. `$ cmake [path to swift src]/benchmark -G Ninja -DSWIFT_EXEC=[path to built swiftc]`
83+
3. `$ ninja swift-benchmark-macosx-x86_64`
8684

8785
Benchmark binaries are placed in `bin`.
8886

@@ -96,12 +94,12 @@ relative to the benchmark binary at the time it was executed
9694
For example, to benchmark against a locally built `swiftc`, including
9795
any standard library changes in that build, you might configure using:
9896

99-
cmake ../benchmark -G Ninja -DSWIFT_EXEC=<src>/swift/build/swift-macosx-x86_64/bin/swiftc
97+
cmake <src>/benchmark -G Ninja -DSWIFT_EXEC=<build>/swift-macosx-x86_64/bin/swiftc
10098
ninja swift-benchmark-iphoneos-arm64
10199

102100
To build against the installed Xcode, simply omit SWIFT_EXEC:
103101

104-
cmake ../benchmark -G Ninja
102+
cmake <src>/benchmark -G Ninja
105103
ninja swift-benchmark-iphoneos-arm64
106104

107105
In both examples above, to run the benchmarks on a device, the dynamic
@@ -110,7 +108,7 @@ relative to `swiftc`. To benchmark against the target machine's
110108
installed libraries instead, enable
111109
`SWIFT_BENCHMARK_USE_OS_LIBRARIES`.
112110

113-
cmake ../benchmark -G Ninja -DSWIFT_BENCHMARK_USE_OS_LIBRARIES=ON
111+
cmake <src>/benchmark -G Ninja -DSWIFT_BENCHMARK_USE_OS_LIBRARIES=ON
114112
ninja swift-benchmark-iphoneos-arm64
115113

116114
This will reflect the performance of the Swift standard library

0 commit comments

Comments
 (0)