Skip to content

Commit 8bda672

Browse files
author
K Staring
committed
Merge branch 'master' of https://github.com/apple/swift
2 parents ede70f2 + 3a697ec commit 8bda672

File tree

545 files changed

+116238
-9153
lines changed

Some content is hidden

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

545 files changed

+116238
-9153
lines changed

.dir-locals.el

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,19 @@
1010
;
1111
;===----------------------------------------------------------------------===;
1212
;;; Directory Local Variables
13-
;;; See Info node `(emacs) Directory Variables' for more information.
13+
;;; For more information see (info "(emacs) Directory Variables")
1414

1515
((nil
1616
(tab-width . 2)
1717
(fill-column . 80)
18-
(eval .
19-
;; Load the Swift project's settings. To suppress this action
20-
;; you can put "(provide 'swift-project-settings)" in your
21-
;; .emacs
18+
(eval let* ((x (dir-locals-find-file default-directory))
19+
(this-directory (if (listp x) (car x)
20+
(file-name-directory x))))
2221
(unless (featurep 'swift-project-settings)
23-
;; Make sure the project's own utils directory is in the
24-
;; load path, but don't override any one the user might have
25-
;; set up.
26-
(add-to-list
27-
'load-path
28-
(concat
29-
(let ((dlff (dir-locals-find-file default-directory)))
30-
(if (listp dlff) (car dlff) (file-name-directory dlff)))
31-
"utils")
32-
:append)
33-
;; Load our project's settings -- indirectly brings in swift-mode
22+
(add-to-list 'load-path (concat this-directory "utils") :append)
23+
(let ((swift-project-directory this-directory))
3424
(require 'swift-project-settings)))
25+
(set (make-local-variable 'swift-project-directory) this-directory))
3526
(c-file-style . "swift")
3627
)
3728
(c++-mode
@@ -44,6 +35,8 @@
4435
(whitespace-style . (face lines indentation:space))
4536
(eval . (whitespace-mode)))
4637
(swift-mode
38+
(swift-find-executable-fn . swift-project-executable-find)
39+
(swift-syntax-check-fn . swift-project-swift-syntax-check)
4740
(whitespace-style . (face lines indentation:space))
4841
(eval . (whitespace-mode))
4942
(swift-basic-offset . 2)

.pep8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[flake8]
2-
filename = *.py,80+-check,backtrace-check,Benchmark_Driver,Benchmark_DTrace.in,Benchmark_GuardMalloc.in,Benchmark_RuntimeLeaksRunner.in,build-script,check-incremental,clang++,coverage-build-db,coverage-generate-data,coverage-touch-tests,gyb,ld,line-directive,mock-distcc,ns-html2rst,PathSanitizingFileCheck,recursive-lipo,rth,run-test,submit-benchmark-results,update-checkout,viewcfg,symbolicate-linux-fatal
2+
filename = *.py,80+-check,backtrace-check,Benchmark_Driver,Benchmark_DTrace.in,Benchmark_GuardMalloc.in,Benchmark_RuntimeLeaksRunner.in,build-script,check-incremental,clang++,coverage-build-db,coverage-generate-data,coverage-query-db,coverage-touch-tests,gyb,ld,line-directive,mock-distcc,ns-html2rst,PathSanitizingFileCheck,recursive-lipo,rth,run-test,submit-benchmark-results,update-checkout,viewcfg,symbolicate-linux-fatal

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ CHANGELOG
2020
Swift 3.1
2121
---------
2222

23+
* [SR-1009](https://bugs.swift.org/browse/SR-1009):
24+
25+
Constrained extensions allow same-type constraints between generic parameters and concrete types.
26+
27+
```swift
28+
extension Array where Element == Int { }
29+
```
30+
2331
* [SE-0045][]:
2432

2533
The `Sequence` protocol adds new members `prefix(while:)` and

CMakeLists.txt

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ if(POLICY CMP0054)
88
cmake_policy(SET CMP0054 NEW)
99
endif()
1010

11+
# Enable the IN_LIST operator, as in:
12+
# `if(<element_variable> IN_LIST <list_variable>)`
13+
if(POLICY CMP0057)
14+
cmake_policy(SET CMP0057 NEW)
15+
endif()
16+
1117
# Add path for custom CMake modules.
1218
list(APPEND CMAKE_MODULE_PATH
1319
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
@@ -269,6 +275,10 @@ option(SWIFT_STDLIB_ENABLE_RESILIENCE
269275
"Build the standard libraries and overlays with resilience enabled; see docs/LibraryEvolution.rst"
270276
FALSE)
271277

278+
option(SWIFT_STDLIB_ENABLE_SIL_OWNERSHIP
279+
"Build the standard libraries and overlays with sil ownership enabled."
280+
FALSE)
281+
272282
option(SWIFT_STDLIB_SIL_SERIALIZE_ALL
273283
"Build the standard libraries and overlays serializing all method bodies"
274284
TRUE)
@@ -413,6 +423,12 @@ include_directories(BEFORE
413423
# endif()
414424
set(SWIFT_DARWIN_VARIANTS "^(macosx|iphoneos|iphonesimulator|appletvos|appletvsimulator|watchos|watchsimulator)")
415425

426+
# A convenient list to match Darwin SDKs. Example:
427+
# if("${SWIFT_HOST_VARIANT_SDK}" IN_LIST SWIFT_APPLE_PLATFORMS)
428+
# ...
429+
# endif()
430+
set(SWIFT_APPLE_PLATFORMS "IOS" "IOS_SIMULATOR" "TVOS" "TVOS_SIMULATOR" "WATCHOS" "WATCHOS_SIMULATOR" "OSX")
431+
416432
# Configuration flags passed to all of our invocations of gyb. Try to
417433
# avoid making up new variable names here if you can find a CMake
418434
# variable that will do the job.
@@ -491,11 +507,10 @@ function(is_sdk_requested name result_var_name)
491507
if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${name}")
492508
set("${result_var_name}" "TRUE" PARENT_SCOPE)
493509
else()
494-
list(FIND SWIFT_SDKS "${name}" sdk_index)
495-
if(${sdk_index} EQUAL -1)
496-
set("${result_var_name}" "FALSE" PARENT_SCOPE)
497-
else()
510+
if("${name}" IN_LIST SWIFT_SDKS)
498511
set("${result_var_name}" "TRUE" PARENT_SCOPE)
512+
else()
513+
set("${result_var_name}" "FALSE" PARENT_SCOPE)
499514
endif()
500515
endif()
501516
endfunction()

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
|**Ubuntu 14.04** |[![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-14_04/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-14_04)|
88
|**Ubuntu 15.10** |[![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-15_10/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-15_10)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-15_10/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-15_10)|
99
|**Ubuntu 16.04** |[![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_04/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04)|
10+
|**Ubuntu 16.10** |[![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_10/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_10)|
1011

1112
**Welcome to Swift!**
1213

apinotes/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ endforeach()
6666
file(GLOB SWIFT_API_NOTES_INPUT_FILES "${SWIFT_API_NOTES_PATH}/*.apinotes")
6767
foreach(file ${SWIFT_API_NOTES_INPUT_FILES})
6868
get_filename_component(name "${file}" NAME_WE)
69-
list(FIND SWIFT_API_NOTES_INPUTS "${name}" name_index)
70-
if(name_index EQUAL -1)
69+
if(NOT "${name}" IN_LIST SWIFT_API_NOTES_INPUTS)
7170
message(SEND_ERROR "Found apinotes for ${name}; please add to CMakeLists.txt")
7271
endif()
7372
endforeach()

apinotes/Foundation.apinotes

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Classes:
157157
Methods:
158158
- Selector: 'notificationCenterForType:'
159159
MethodKind: Class
160-
FactoryAsInit: C
160+
SwiftName: 'forType(_:)'
161161
- Name: NSHTTPCookie
162162
SwiftName: HTTPCookie
163163
- Name: NSHTTPCookieStorage
@@ -209,10 +209,6 @@ Classes:
209209
- Name: NSProcessInfo
210210
SwiftName: ProcessInfo
211211
Methods:
212-
- Selector: processInfo
213-
MethodKind: Class
214-
NullabilityOfRet: N
215-
FactoryAsInit: C
216212
- Selector: 'isOperatingSystemAtLeastVersion:'
217213
SwiftName: isOperatingSystemAtLeast(_:)
218214
MethodKind: Instance

apinotes/GameKit.apinotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Classes:
55
Methods:
66
- Selector: 'localPlayer'
77
MethodKind: Class
8-
FactoryAsInit: C
8+
SwiftName: 'localPlayer()'
99
Tags:
1010
- Name: GKErrorCode
1111
NSErrorDomain: GKErrorDomain

apinotes/NotificationCenter.apinotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Classes:
44
Methods:
55
- Selector: 'widgetController'
66
MethodKind: Class
7-
FactoryAsInit: C
7+
SwiftName: 'widgetController()'

apinotes/UIKit.apinotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Classes:
1010
Methods:
1111
- Selector: printInfo
1212
MethodKind: Class
13-
FactoryAsInit: C
13+
SwiftName: 'printInfo()'
1414
- Name: UIPrintInteractionController
1515
Properties:
1616
- Name: 'sharedPrintController'

0 commit comments

Comments
 (0)