Skip to content

Commit 979b756

Browse files
committed
Merge branch 'master' into remotemirror-hide-reflection-sections
2 parents ef863ab + 571522e commit 979b756

File tree

769 files changed

+11600
-5638
lines changed

Some content is hidden

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

769 files changed

+11600
-5638
lines changed

CHANGELOG.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ CHANGELOG
2323
Swift 4.2
2424
---------
2525

26+
* [SE-0196][]
27+
28+
Custom compile-time warnings or error messages can be emitted using the
29+
`#warning(_:)` and `#error(_:)` directives.
30+
31+
```swift
32+
#warning("this is incomplete")
33+
34+
#if MY_BUILD_CONFIG && MY_OTHER_BUILD_CONFIG
35+
#error("MY_BUILD_CONFIG and MY_OTHER_BUILD_CONFIG cannot both be set")
36+
#endif
37+
```
38+
2639
* Public classes may now have internal `required` initializers. The rule for
2740
`required` initializers is that they must be available everywhere the class
2841
can be subclassed, but previously we said that `required` initializers on
@@ -114,17 +127,19 @@ Swift 4.1
114127
recursive constraints. For example, the `SubSequence` associated type of
115128
`Sequence` follows the enclosing protocol:
116129

117-
protocol Sequence {
118-
associatedtype Element
119-
associatedtype SubSequence: Sequence
120-
where SubSequence.Element == Element,
121-
SubSequence.SubSequence == SubSequence
122-
// ...
123-
}
130+
```swift
131+
protocol Sequence {
132+
associatedtype Element
133+
associatedtype SubSequence: Sequence
134+
where SubSequence.Element == Element,
135+
SubSequence.SubSequence == SubSequence
136+
// ...
137+
}
124138

125-
protocol Collection: Sequence where Self.SubSequence: Collection {
126-
// ...
127-
}
139+
protocol Collection: Sequence where Self.SubSequence: Collection {
140+
// ...
141+
}
142+
```
128143

129144
As a result, a number of new constraints have been introduced into the
130145
standard library protocols:

CMakeLists.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -822,20 +822,23 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND NOT CMAKE_CROSSCOMPILING)
822822
endif()
823823

824824
message(STATUS "Building host Swift tools for ${SWIFT_HOST_VARIANT_SDK} ${SWIFT_HOST_VARIANT_ARCH}")
825-
message(STATUS " Build type: ${CMAKE_BUILD_TYPE}")
826-
message(STATUS " Assertions: ${LLVM_ENABLE_ASSERTIONS}")
827-
message(STATUS " LTO: ${SWIFT_TOOLS_ENABLE_LTO}")
825+
message(STATUS " Build type: ${CMAKE_BUILD_TYPE}")
826+
message(STATUS " Assertions: ${LLVM_ENABLE_ASSERTIONS}")
827+
message(STATUS " LTO: ${SWIFT_TOOLS_ENABLE_LTO}")
828+
message(STATUS " +0 Normal Args: ${SWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENTS}")
828829
message(STATUS "")
829830

830-
if (SWIFT_BULID_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
831+
if (SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
831832

832833
message(STATUS "Building Swift standard library and overlays for SDKs: ${SWIFT_SDKS}")
833-
message(STATUS " Build type: ${SWIFT_STDLIB_BUILD_TYPE}")
834-
message(STATUS " Assertions: ${SWIFT_STDLIB_ASSERTIONS}")
834+
message(STATUS " Build type: ${SWIFT_STDLIB_BUILD_TYPE}")
835+
message(STATUS " Assertions: ${SWIFT_STDLIB_ASSERTIONS}")
836+
message(STATUS " +0 Normal Args: ${SWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENTS}")
835837
message(STATUS "")
836838

837839
message(STATUS "Building Swift runtime with:")
838840
message(STATUS " Leak Detection Checker Entrypoints: ${SWIFT_RUNTIME_ENABLE_LEAK_CHECKER}")
841+
message(STATUS " +0 Normal Args: ${SWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENTS}")
839842
message(STATUS "")
840843

841844
else()

benchmark/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ set(SWIFT_BENCH_MODULES
5555
single-source/Chars
5656
single-source/ClassArrayGetter
5757
single-source/Combos
58+
single-source/DataBenchmarks
5859
single-source/DeadArray
5960
single-source/DictOfArraysToArrayOfDicts
6061
single-source/DictTest
6162
single-source/DictTest2
6263
single-source/DictTest3
6364
single-source/DictTest4
6465
single-source/DictionaryBridge
66+
single-source/DictionaryCopy
6567
single-source/DictionaryGroup
6668
single-source/DictionaryLiteral
6769
single-source/DictionaryRemove
@@ -75,6 +77,7 @@ set(SWIFT_BENCH_MODULES
7577
single-source/Exclusivity
7678
single-source/ExistentialPerformance
7779
single-source/Fibonacci
80+
single-source/FloatingPointPrinting
7881
single-source/Hanoi
7982
single-source/Hash
8083
single-source/HashQuadratic
@@ -229,6 +232,14 @@ endif()
229232
set(SWIFT_BENCHMARK_EXTRA_FLAGS "" CACHE STRING
230233
"Extra options to pass to swiftc when building the benchmarks")
231234

235+
if (SWIFT_BENCHMARK_BUILT_STANDALONE)
236+
# This option's value must match the value of the same option used when
237+
# building the swift runtime.
238+
option(SWIFT_RUNTIME_ENABLE_LEAK_CHECKER
239+
"Should the runtime be built with support for non-thread-safe leak detecting entrypoints"
240+
FALSE)
241+
endif()
242+
232243
set(SWIFT_BENCHMARK_NUM_O_ITERATIONS "" CACHE STRING
233244
"Number of iterations to perform when running -O benchmarks via cmake")
234245
set(SWIFT_BENCHMARK_NUM_ONONE_ITERATIONS "" CACHE STRING

0 commit comments

Comments
 (0)