Skip to content

Merge tag 'swift-DEVELOPMENT-SNAPSHOT-2019-09-02-a' into tensorflow #27232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 488 commits into from
Sep 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
488 commits
Select commit Hold shift + click to select a range
8ad3cc8
Revert "[Parser] Decouple the parser from AST creation (part 2)"
rintaro Aug 27, 2019
d745096
Conditionalize KVOKeyPaths tests that only work with Swift 5.1 (2)
aschwaighofer Aug 27, 2019
e61c1cc
Merge pull request #26871 from adrian-prantl/49233932-pch
swift-ci Aug 27, 2019
94112ef
Merge pull request #26851 from gottesmm/pr-47fb2b3ffcc142eb6fe2703fdc…
swift-ci Aug 27, 2019
1b397ed
[ConstraintSystem] Be more principled about recording r-value -> l-va…
xedin Aug 26, 2019
25b849b
Merge pull request #26873 from nkcsgexi/api-digester-fully-qulified-t…
nkcsgexi Aug 27, 2019
76c29af
[Test] Adds a test case
theblixguy Aug 27, 2019
92eaeca
Fix test to ignore two unused classes still present on old runtimes
Catfish-Man Aug 27, 2019
9a663b6
Merge pull request #26853 from rudedogg/master
lorentey Aug 27, 2019
8da33a9
Merge pull request #26876 from apple/revert-26478-gsoc-2019-parser-types
rintaro Aug 27, 2019
cb308b7
Revert "Revert "[Parser] Decouple the parser from AST creation (part …
rintaro Aug 27, 2019
a2d383e
Merge pull request #26810 from jckarter/class-let-property-borrow
gottesmm Aug 27, 2019
d8870fc
[semantic-arc-opts] Add a worklist.
gottesmm Aug 26, 2019
0660764
[CS] Move the check to resolveOverload()
theblixguy Aug 27, 2019
e5e48cb
Merge pull request #26813 from jrose-apple/a-more-direct-approach
jrose-apple Aug 27, 2019
b33c520
[CS] Extract the check into a separate lambda
theblixguy Aug 27, 2019
807e3f3
[SyntaxParse] Fix round-trip issue in generic argument parsing
rintaro Aug 27, 2019
6797148
[CS] Only check for the presence of a paren expr
theblixguy Aug 27, 2019
5103789
[SyntaxParse] Fix AST source locations for function types
rintaro Aug 27, 2019
774788a
[test] Disable misaligned indices test prior to 5.1
milseman Aug 27, 2019
b90e2ef
[test] Denineninenineninify behavioral tests added for 5.1
lorentey Aug 27, 2019
32cfd5b
[CS] Only check if the decl has a function type
theblixguy Aug 27, 2019
d0530b9
Merge pull request #26798 from xedin/introduces-cs-holes
xedin Aug 27, 2019
ba0612f
Add `Builtin.isConcrete<T>(T.Type) -> Int1`
nvzqz Jul 25, 2019
da14b83
Never inline `isConcrete_false` test
nvzqz Aug 14, 2019
c4cd641
Fix variable reference in ConstantFolding phase
nvzqz Aug 15, 2019
890409e
Elaborate in docs for `Swift._isConcrete`
nvzqz Aug 15, 2019
b35559e
Remove `Builtin.isConcrete` IRGenPrepare SIL test
nvzqz Aug 20, 2019
6fd7db8
Add IRGen SIL test for `Builtin.isConcrete`
nvzqz Aug 20, 2019
34eccf5
Add visibility specifiers to isConcrete IRGen test
nvzqz Aug 20, 2019
6e542bf
Annotate `Swift._isConcrete` with `@_transparent`
nvzqz Aug 20, 2019
a1f3cb9
Add comment on required isConcrete specialization
nvzqz Aug 20, 2019
ff7542a
Add SIL combine test for `Builtin.isConcrete`
nvzqz Aug 20, 2019
e6ca03d
Generalize constant_propagation_stdlib SIL tests
nvzqz Aug 27, 2019
931ab46
Remove unused call to `constantFoldIsConcrete`
nvzqz Aug 27, 2019
e6829f2
Merge pull request #26879 from Catfish-Man/all-your-base
swift-ci Aug 28, 2019
870daf3
Merge pull request #26877 from gottesmm/pr-283cbb40e1d2bae71f67901d5f…
swift-ci Aug 28, 2019
9b514db
Merge pull request #26806 from CodaFi/hello-operator-please-give-me-d…
CodaFi Aug 28, 2019
5ec344b
Define SWIFT_REQUEST
CodaFi Aug 27, 2019
a19a70e
Switch all request infrastructure to SWIFT_REQUEST
CodaFi Aug 27, 2019
a2641e7
[NFC] Sort the requests
CodaFi Aug 28, 2019
e9d22f2
[Serialization] Replace fixed-width fields with smaller VBR fields (#…
jrose-apple Aug 28, 2019
447f008
[ownership] Enable ownership lowering on overlays. I still need to fl…
gottesmm Aug 17, 2019
0948695
Merge branch 'master' into fix/SR-11288
theblixguy Aug 28, 2019
e5f1aea
[semantic-arc-opts] Teach the pass how to eliminate copies from begin…
gottesmm Aug 28, 2019
741af6f
[ModuleInterface] Add a test for multiple 'indirect' cases on one lin…
jrose-apple Aug 28, 2019
1e65666
Frontend: add a front-end option to specify module names for which we…
nkcsgexi Aug 28, 2019
cc9672e
Merge pull request #26892 from CodaFi/zoned-out
CodaFi Aug 28, 2019
5d53c3f
Merge pull request #26898 from gottesmm/pr-ec34aef279bb7b977ac2324358…
swift-ci Aug 28, 2019
e29dc4e
Merge pull request #26894 from nkcsgexi/frontend-opts-load-interface-…
nkcsgexi Aug 28, 2019
74f8d09
Merge pull request #26899 from CodaFi/static_assort
swift-ci Aug 28, 2019
77d77c0
Merge pull request #26895 from gottesmm/pr-1269f7cc47321dcf6d2fc16ee8…
gottesmm Aug 28, 2019
7b8fb88
Merge pull request #26852 from xedin/refactor-treat-r-as-l-value
xedin Aug 28, 2019
844feda
[ConstraintSystem] Introduce a fix to allow conversion between `inout…
xedin Aug 28, 2019
f0f95f1
tests: fix a check line in the prespecialization test
eeckstein Aug 12, 2019
8b11e7c
SILOptimizer: handle copy_addr [take] in TempRValueOpt
eeckstein Aug 12, 2019
9e67408
MemoryLifetime: Make the dataflow solving functions of MemoryDataflow…
eeckstein Aug 22, 2019
34e80b7
tests: fix array lifetime problem in the DispatchData test.
eeckstein Aug 28, 2019
0e08976
SILOptimizer: a new optimization to hoist destroys of memory locations
eeckstein Aug 8, 2019
0345186
[Stdlib] Skip Mirror.swift's Subclass, Fields, and Cases tests on old…
mikeash Aug 28, 2019
9e61d53
Merge pull request #26516 from mikeash/retain-release-avoid-function-…
mikeash Aug 28, 2019
10fd6fb
Merge pull request #26878 from aschwaighofer/conditionalize_kvopaths_…
aschwaighofer Aug 28, 2019
62f947d
[Serialization] Drop GenericEnvironmentID for GenericSignatureID (#26…
jrose-apple Aug 28, 2019
faaa3a8
Merge pull request #26883 from rintaro/revert-revert-26478-gsoc-2019-…
rintaro Aug 28, 2019
64c32f3
Add missing ) and code voice.
amartini51 Aug 28, 2019
e7fdd67
test: enable -enable-library-evolution in compare-dump-interface-vs-b…
nkcsgexi Aug 28, 2019
8ea5df1
Merge pull request #26803 from eeckstein/destroy-hoisting
eeckstein Aug 28, 2019
1cc3ed0
[gardening] Eliminate two unused variables.
gottesmm Aug 28, 2019
1415f2f
LazyASTScopes only matters when ASTScopes are enabled
Aug 28, 2019
55f9be3
Switch "may" to "might" per comments from @amartini51.
natecook1000 Aug 28, 2019
6374d36
ABI/API checker: diagnose ObjC name changes as breakages
nkcsgexi Aug 28, 2019
a49e0d5
Runtime: Hook the ObjC runtime with an untrusted demangler.
jckarter Aug 28, 2019
f758d22
benchmark: add naive string finding
weissi Aug 20, 2019
4af31e6
Merge pull request #26907 from nkcsgexi/post-merge-comment-address
nkcsgexi Aug 28, 2019
228a394
Merge pull request #26908 from gottesmm/pr-fc8e6588b30f2b2c82b8310793…
swift-ci Aug 28, 2019
b9cf4fa
[Diagnostics] Add a diagnostic for invalid conversion of `inout` argu…
xedin Aug 28, 2019
8f56771
Merge pull request #26881 from mikeash/skip-new-mirror-tests-on-old-oses
swift-ci Aug 28, 2019
b3d95d7
AST: removeShadowedDecls() takes a DeclContext instead of a ModuleDecl
slavapestov Aug 26, 2019
f804efd
Merge pull request #25430 from natecook1000/nc-prefixwhile-degyb
swift-ci Aug 28, 2019
acf5371
AST: Introduce a new ImportCache singleton
slavapestov Aug 26, 2019
3819f34
AST: Use ImportCache to simplify SourceFile::isImportedImplementation…
slavapestov Aug 26, 2019
665cff1
AST: Use ImportCache to simplify DeclContext::lookupQualified()
slavapestov Aug 26, 2019
dcefd7f
AST: Qualified lookup doesn't need to prune duplicate results
slavapestov Aug 28, 2019
71eae32
AST: Use ImportCache to simplify UnqualifiedLookupFactory::lookForAMo…
slavapestov Aug 26, 2019
962f358
AST: Don't compute overload signature unless needed in removeShadowed…
slavapestov Aug 27, 2019
1c28684
AST: Add module visibility shadowing rule to removeShadowedDecls()
slavapestov Aug 26, 2019
7039277
Merge pull request #26906 from amartini51/master
swift-ci Aug 28, 2019
2ae2006
Fix test
Aug 28, 2019
03bd71c
Merge pull request #26910 from nkcsgexi/diagnose-objc-name-change
nkcsgexi Aug 28, 2019
a7888f0
[test] Remove redirection stderr->out that corrupted output.
drodriguez Aug 28, 2019
5354f9f
Merge pull request #26911 from jckarter/objc_getClass-untrusted-deman…
jckarter Aug 28, 2019
d30ec5b
Merge pull request #26884 from milseman/cache_alignment
milseman Aug 28, 2019
746340f
[code-completion] Don't delay parsing a decl within a closure - delay…
Aug 28, 2019
3321794
Merge pull request #26902 from davidungar/lazy-cleanup
swift-ci Aug 28, 2019
8fcc94f
Merge pull request #26885 from lorentey/nein-nein-nein-nein
lorentey Aug 28, 2019
28d0c08
[CSApply] shouldForceUnwrapResult() should return false when we don't…
theblixguy Aug 28, 2019
108a02f
[semantic-arc-opts] Fix small bug around eliminating copies from begi…
gottesmm Aug 28, 2019
a2daa11
Merge branch 'master' into fix/SR-10492
theblixguy Aug 28, 2019
532498b
[CSApply] Use the choiceLocator, not locator when checking if a disju…
theblixguy Aug 28, 2019
6dd41f4
ABI checker: exclude unavailable decls from ABI descriptors
nkcsgexi Aug 28, 2019
bdda81c
[SyntaxParse] use parseGenericArgumentClauseSyntax()
rintaro Aug 27, 2019
c073e62
Merge pull request #26858 from mwyman/master
swift-ci Aug 28, 2019
41eebd2
[SyntaxParse] Fix round-trip issue in tuple type parsing
rintaro Aug 29, 2019
facd27f
Merge pull request #26912 from xedin/allow-inout-conversion-fix
xedin Aug 29, 2019
b32386b
[CS] If locator points to a function call, then compare the fn and se…
theblixguy Aug 29, 2019
57e1732
Merge pull request #26919 from nathawes/r54219186-interpolated-string…
Aug 29, 2019
f335010
Merge pull request #26922 from nkcsgexi/remove-unavailable-decls-from…
nkcsgexi Aug 29, 2019
e5fa534
[NFC] Drop some useless helper functions
CodaFi Aug 29, 2019
da8ef33
Merge pull request #26791 from slavapestov/new-shadowing-rule-part-1
slavapestov Aug 29, 2019
f567b8f
AST: Use new module shadowing rule for qualified lookups too
slavapestov Aug 26, 2019
61a4a48
AST: Add scoped import shadowing rule to removeShadowedDecls()
slavapestov Aug 27, 2019
37f308b
AST: Change lookupInModule() to take a DeclContext instead of a modul…
slavapestov Aug 27, 2019
1224e90
Merge pull request #26926 from CodaFi/parameterized-nonsense
swift-ci Aug 29, 2019
b8f42d6
Merge pull request #26466 from nvzqz/is_concrete_builtin
swift-ci Aug 29, 2019
0899eb6
Merge pull request #26914 from rintaro/syntaxparse-genericargsyntax
rintaro Aug 29, 2019
d8f7c9e
[Parser] Introduce a request for parsing type and extension members.
DougGregor Aug 29, 2019
ec3975a
Merge pull request #26920 from gottesmm/pr-93c0bf13b0385db5c587ec3901…
gottesmm Aug 29, 2019
5f01b0d
tests: make two tests more resilient to destroy hoisting
eeckstein Aug 29, 2019
771a390
Merge pull request #26929 from eeckstein/fix-tests
swift-ci Aug 29, 2019
016acf3
Merge pull request #26864 from slavapestov/new-shadowing-rule-part-2
slavapestov Aug 29, 2019
8f26405
tests: fix the commandline for the optionset test
eeckstein Aug 29, 2019
11e206a
Remove explicit seeds from string hashes that are compiler-dependent
jrose-apple Aug 15, 2019
b0ad06a
[Serialization] The hash seed for DeclCommentTableInfo can't change
jrose-apple Aug 20, 2019
c06e105
[Serialization] Switch to a better hash seed for lookup tables
jrose-apple Aug 15, 2019
6842134
Outliner fix: Make sure the enum actually has an operand before we ac…
aschwaighofer Aug 28, 2019
974c9d1
[SyntaxParse] Fix round-trip issue in function types
rintaro Aug 29, 2019
9dd5a3c
[Parser] Make delayed member parsing not depend on "persistent parser…
DougGregor Aug 29, 2019
3a78945
Merge pull request #26916 from drodriguez/test-dump-parse-without-stderr
drodriguez Aug 29, 2019
6fcbb40
Merge pull request #26933 from rintaro/syntaxparse-roundtrip1
rintaro Aug 29, 2019
fc9fef2
[CS] Be more defensive in isIUOWrappedInParens() check
theblixguy Aug 29, 2019
4e8426b
AST: ImportSets keep track of whether they contain the ClangImporter'…
slavapestov Aug 29, 2019
053c3c7
AST: New implementation of lookupInModule() that uses the ImportCache
slavapestov Aug 22, 2019
2256b1f
AST: Introduce namelookup::getAllImports() to replace forAllVisibleMo…
slavapestov Aug 27, 2019
3956fc0
AST: Fold forAllImportedModules() into collectLinkLibraries()
slavapestov Aug 27, 2019
d280ae4
Sema: Replace a lookupUnqualifiedType() with lookupInModule()
slavapestov Aug 27, 2019
1ca90ef
[SyntaxParse] Fix memory leaks
rintaro Aug 29, 2019
f1f75ca
Merge pull request #26931 from aschwaighofer/outliner_fix
aschwaighofer Aug 29, 2019
bed890c
[SILOptimizer] Added MandatoryCombiner.
nate-chandler Aug 27, 2019
89516d0
build: dereference variable as appropriate
compnerd Aug 29, 2019
2c9def8
Merge pull request #26925 from DougGregor/parse-members-request
DougGregor Aug 29, 2019
9bc5a55
Merge pull request #26685 from jrose-apple/po-tay-toes
jrose-apple Aug 29, 2019
bd222ad
Merge pull request #26913 from nate-chandler/mandatory-combiner
swift-ci Aug 29, 2019
1e173d8
ABI/API checker: populate several lazily computed attributes to nodes
nkcsgexi Aug 29, 2019
ecf8146
[Diagnostics] Treat type requirement failures associated with `Self` …
xedin Aug 29, 2019
b8ced14
[SyntaxParse] Improve ParsedRawSyntaxNode::dump()
rintaro Aug 29, 2019
c904a59
[CSDiagnostics] Do not crash when the path is empty and we have a cal…
theblixguy Aug 29, 2019
016e3dc
[Test] Adds a validation test
theblixguy Aug 29, 2019
0e3987a
Factor out a visitor from findAccessedStorage.
jckarter Aug 28, 2019
97d15f6
Use the new visitor to handle multiple borrows in SemanticARCOpts.
jckarter Aug 28, 2019
eb217bf
[Sema] Produce a type-checked AST when deriving the hashValue getter.
DougGregor Aug 29, 2019
e49401b
Merge pull request #26937 from rintaro/syntaxparse-leakfix
rintaro Aug 29, 2019
50147c4
Merge pull request #26940 from nkcsgexi/populate-attribute
nkcsgexi Aug 29, 2019
faf6ba0
Revert "[CSDiagnostics] Do not crash when the path is empty and we ha…
theblixguy Aug 29, 2019
d0d89fa
Merge pull request #26943 from rintaro/syntaxparse-parsedrawnode-dump
rintaro Aug 29, 2019
86807ac
[CSSimplify] If the locator path is empty, then return failure
theblixguy Aug 29, 2019
6e25fd9
Stop hiding '@frozen' from code completion (#26942)
jrose-apple Aug 29, 2019
67e7eba
[Sema] Synthesize pre-type-checked == for uninhabited enums.
DougGregor Aug 29, 2019
af30902
Merge pull request #26865 from slavapestov/faster-module-name-lookup
slavapestov Aug 29, 2019
7aad090
Update the LLVM Project repo to v2
shahmishal Aug 29, 2019
dee2627
[semantic-arc-opts] Change semantic arc opts to use a SmallBlotSetVec…
gottesmm Aug 30, 2019
02d6075
[Sema] Synthesize pre-type-checked AST for == on no-associated-value …
DougGregor Aug 29, 2019
9222dfd
[Sema] Fix protocol refinement access control message (#26855)
owenv Aug 30, 2019
3eea861
[CSSimplify] Return failure if there are no elements in the path and …
theblixguy Aug 30, 2019
4126215
Merge pull request #26831 from theblixguy/fix/SR-10492
theblixguy Aug 30, 2019
c0ec48c
Merge pull request #26896 from jckarter/accessed-storage-chain-visitor
jckarter Aug 30, 2019
d128664
Merge pull request #26744 from weissi/jw-bench-find-string
gottesmm Aug 30, 2019
5085e45
Merge pull request #26945 from gottesmm/pr-380b7ca9a019868d2a9fe0de56…
gottesmm Aug 30, 2019
dbf84f3
[semantic-arc] Rename isWrittenTo -> isLoadGuaranteedByStorage.
gottesmm Aug 30, 2019
225c3f8
[semantic-arc] Rename isConsumed -> isDeadLiveRange.
gottesmm Aug 30, 2019
23fe5ed
[SyntaxParse] Don't parse postfix if faield to parse type identifier
rintaro Aug 30, 2019
f5f0101
Fix ASTScope PatternEntryDeclScope::beCurrent typo
Aug 30, 2019
7f26004
Merge pull request #26950 from gottesmm/pr-58d8dce3519c33f66b6246c0c7…
swift-ci Aug 30, 2019
75d482a
Merge pull request #26953 from davidungar/pat-bind-current-fix
swift-ci Aug 30, 2019
9121f45
Merge pull request #26944 from theblixguy/fix/SR-11394
theblixguy Aug 30, 2019
be20957
Merge pull request #26930 from eeckstein/fix-test
eeckstein Aug 30, 2019
fd86e85
Revert "[SILOptimizer] Added MandatoryCombiner."
eeckstein Aug 30, 2019
7ea48a8
Merge pull request #26954 from apple/revert-26913-mandatory-combiner
eeckstein Aug 30, 2019
4fa3cef
Merge pull request #26938 from compnerd/star
compnerd Aug 30, 2019
1196984
Simplify lazy parsing of nominal and extension members.
DougGregor Aug 30, 2019
0989943
Add PersistentParserState constructor back for LLDB.
DougGregor Aug 30, 2019
879d617
Remove unnecessary assertion
DougGregor Aug 30, 2019
987b856
Merge pull request #26952 from rintaro/syntaxparse-type-failedpostfix
rintaro Aug 30, 2019
88f8592
Merge pull request #26951 from gottesmm/pr-b8323b758c1b08c4aa81aef51c…
gottesmm Aug 30, 2019
7ca5abd
Ensure we have type-checked _hashValue(for:) before we use it.
DougGregor Aug 30, 2019
acba675
[Test] Add more test cases as requested
theblixguy Aug 30, 2019
eb4d0ee
[semantic-arc] Invert a condition so that the early exit is first.
gottesmm Aug 30, 2019
022d3a5
Revert "[semantic-arc] Rename isWrittenTo -> isLoadGuaranteedByStorage."
gottesmm Aug 30, 2019
d219829
Merge pull request #26795 from theblixguy/fix/SR-11288
theblixguy Aug 30, 2019
962c9d2
Merge pull request #26959 from gottesmm/pr-0f450ce44620c82851110ae19f…
swift-ci Aug 30, 2019
c16b888
Merge pull request #26941 from xedin/req-failures-with-any
xedin Aug 30, 2019
d093296
swift-api-checker.py: teach the script to generate target-specific ba…
nkcsgexi Aug 30, 2019
0e8d600
[NFC] Make DeclName::dump() and ObjCSelector::dump() work
beccadax Aug 30, 2019
c1e41a3
Merge pull request #26963 from nkcsgexi/collect-baseline-module
nkcsgexi Aug 30, 2019
7e21c16
Merge pull request #26955 from DougGregor/simplify-lazy-member-parsing
DougGregor Aug 30, 2019
4f7ade9
cmake: symlink framework ABI baseline data into the build directory
nkcsgexi Aug 30, 2019
242699f
[IDE] Disable constraint system diagnostics during code completion
rintaro May 16, 2019
f11cc97
[Sema] Cosolidate suppress diagnostics mechanisms
rintaro May 16, 2019
8bd9fde
Revert "[code-completion] Disable diagnostics in @functionBuilder bod…
rintaro Jul 2, 2019
feb48a6
[code-completion] Fix correctness regressions from disabling diagnost…
Aug 27, 2019
dccca2f
Merge pull request #26946 from DougGregor/synthesize-pre-type-checked
DougGregor Aug 30, 2019
08c943d
Merge pull request #26966 from nkcsgexi/cmake-abi-baseline-data
nkcsgexi Aug 30, 2019
dcd0893
Merge pull request #26815 from ravikandhadai/oslog-integer-types
ravikandhadai Aug 30, 2019
2ab05a6
Add a request to lazily parse function bodies.
DougGregor Aug 30, 2019
bd53fe3
Revert "[CS] Don't crash when default argument is magic literal and t…
theblixguy Aug 30, 2019
ed0d5dd
Merge pull request #26888 from nathawes/pr-disable-diagnostics-for-co…
swift-ci Aug 31, 2019
2ad0360
Merge pull request #26618 from marcrasi/syntax-data-sized-deallocation
swift-ci Aug 31, 2019
5d4b151
Merge pull request #26964 from brentdax/dump-rump
beccadax Aug 31, 2019
60a5564
Merge pull request #26973 from apple/revert-26074-fix/SR-11074
swift-ci Aug 31, 2019
7ce3553
Merge pull request #26972 from DougGregor/request-function-body-parse
DougGregor Aug 31, 2019
bcf93c6
Merge pull request #26958 from gottesmm/pr-266cfd499d8b73f2e36fbf2ce2…
gottesmm Aug 31, 2019
df6ff7f
[semantic-arc-opts] Teach load [copy] -> load_borrow about forwarding…
gottesmm Aug 30, 2019
178e5d5
swift-api-digester: teach the tool to find framework-specific baselin…
nkcsgexi Aug 31, 2019
903eeb2
Revert "Add a request to lazily parse function bodies."
eeckstein Aug 31, 2019
a951a4f
Merge pull request #26978 from apple/revert-26972-request-function-bo…
eeckstein Aug 31, 2019
a5d7b72
Merge pull request #26956 from gottesmm/pr-26ba3ee6d03272d059164d68ed…
swift-ci Aug 31, 2019
6b9133b
Merge pull request #26977 from nkcsgexi/api-digester-use-builtin-base…
nkcsgexi Aug 31, 2019
d576fc1
[Test] Add a compiler crasher
theblixguy Aug 31, 2019
8c5730a
[Test] Fix incorrect SR number
theblixguy Aug 31, 2019
95132fd
Merge pull request #26979 from theblixguy/chore/add-compiler-crasher-…
swift-ci Aug 31, 2019
1cd5d2e
Bring back SourceManager::rangeContainsCodeCompletionLoc()
DougGregor Aug 31, 2019
d8b745d
Add a request to lazily parse function bodies.
DougGregor Aug 30, 2019
9249966
[Source loader] Delay parsing and type checking for source imports.
DougGregor Aug 31, 2019
9022437
[Changelog] Add SE-0253: `func callAsFunction`. (#26866)
dan-zheng Sep 1, 2019
097b1b4
Merge pull request #26981 from DougGregor/request-function-body-parse…
DougGregor Sep 1, 2019
a50796e
Revert "[semantic-arc-opts] Teach load [copy] -> load_borrow about fo…
eeckstein Sep 1, 2019
2570af6
Merge pull request #26983 from apple/revert-26956-pr-26ba3ee6d03272d0…
eeckstein Sep 1, 2019
63a3cee
Revert "swift-api-digester: teach the tool to find framework-specific…
eeckstein Sep 1, 2019
12b33f6
Merge pull request #26984 from apple/revert-26977-api-digester-use-bu…
eeckstein Sep 1, 2019
cc6a246
Revert "Revert "swift-api-digester: teach the tool to find framework-…
nkcsgexi Sep 1, 2019
b1dc288
Parse: repair build after #26981
compnerd Sep 1, 2019
af45d00
Merge pull request #26985 from apple/revert-26984-revert-26977-api-di…
nkcsgexi Sep 1, 2019
7e5e00a
Merge pull request #26986 from compnerd/26981
compnerd Sep 1, 2019
30cdf50
Merge tag 'swift-DEVELOPMENT-SNAPSHOT-2019-09-02-a' into tensorflow-m…
Sep 9, 2019
8a50e80
Merging swift-DEVELOPMENT-SNAPSHOT-2019-09-02-a into tensorflow
Sep 9, 2019
485c1ef
Update dependencies to new snapshot version 'swift-DEVELOPMENT-SNAPSH…
Sep 9, 2019
f35e10d
fix some merge compile errors
Sep 9, 2019
2730ba0
refactor AutoDiff changes in BuiltinGenericSignatureBuilder to work w…
Sep 9, 2019
fb306d7
remove @_transparent from Array.init(arrayLiteral:)
Sep 9, 2019
6a6ffa5
Bring ElementaryFunctions back to tensorflow
Sep 9, 2019
84b2857
refactor type parsing to use new API
Sep 9, 2019
7e89bee
prevent delayed parsing from trying to parse AD synthesized decl members
Sep 10, 2019
319f8be
Merge pull request #27091 from gottesmm/pr-4e08bfd476fc6b39ee3e81032e…
swift-ci Sep 9, 2019
c47e6a8
These files were renamed or not contributed as part of [SE-0253] Intr…
ematejska Sep 11, 2019
e4144e9
Companion fix to: https://github.com/apple/swift/pull/26776
pschuh Sep 14, 2019
9dc2ca1
fix parseQualifiedDeclName for merge (#27174)
Sep 16, 2019
b42dd7c
Make `ElementaryFunctions` available on macOS.
dan-zheng Sep 16, 2019
9a7c32a
[Sema] Fix `Differentiable.TangentVector` derived conformances.
dan-zheng Sep 16, 2019
6d51923
Fix AutoDiff/differentiable_attr_type_checking.swift.
dan-zheng Sep 17, 2019
f3c7cca
Workaround for test/AutoDiff/array.swift.
dan-zheng Sep 18, 2019
e60269b
Merge branch 'tensorflow' into tensorflow-merge
dan-zheng Sep 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,29 @@ CHANGELOG
Swift Next
----------

* [SE-0253][]:

Values of types that declare `func callAsFunction` methods can be called
like functions. The call syntax is shorthand for applying
`func callAsFunction` methods.

```swift
struct Adder {
var base: Int
func callAsFunction(_ x: Int) -> Int {
return x + base
}
}
var adder = Adder(base: 3)
adder(10) // returns 13, same as `adder.callAsFunction(10)`
```

* `func callAsFunction` argument labels are required at call sites.
* Multiple `func callAsFunction` methods on a single type are supported.
* `mutating func callAsFunction` is supported.
* `func callAsFunction` works with `throws` and `rethrows`.
* `func callAsFunction` works with trailing closures.

* [SR-4206][]:

A method override is no longer allowed to have a generic signature with
Expand Down Expand Up @@ -7711,6 +7734,7 @@ Swift 1.0
[SE-0244]: <https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md>
[SE-0245]: <https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md>
[SE-0252]: <https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md>
[SE-0253]: <https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md>
[SE-0254]: <https://github.com/apple/swift-evolution/blob/master/proposals/0254-static-subscripts.md>

[SR-106]: <https://bugs.swift.org/browse/SR-106>
Expand Down
23 changes: 13 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,18 @@ include(CMakePushCheckState)

print_versions()

include(SwiftSharedCMakeConfig)

# NOTE: We include this before SwiftComponents as it relies on some LLVM CMake
# functionality.
# Support building Swift as a standalone project, using LLVM as an
# external library.
if(SWIFT_BUILT_STANDALONE)
swift_common_standalone_build_config(SWIFT)
else()
swift_common_unified_build_config(SWIFT)
endif()

include(SwiftComponents)
include(SwiftHandleGybSources)
include(SwiftSetIfArchBitness)
Expand Down Expand Up @@ -544,16 +556,6 @@ if(NOT CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()

include(SwiftSharedCMakeConfig)

# Support building Swift as a standalone project, using LLVM as an
# external library.
if(SWIFT_BUILT_STANDALONE)
swift_common_standalone_build_config(SWIFT)
else()
swift_common_unified_build_config(SWIFT)
endif()

get_filename_component(SWIFT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} REALPATH)
set(SWIFT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
set(SWIFT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
Expand Down Expand Up @@ -1068,6 +1070,7 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
else()
set(SOURCEKIT_RUNTIME_DIR lib)
endif()
add_dependencies(sourcekit-inproc BlocksRuntime dispatch)
swift_install_in_component(FILES
$<TARGET_FILE:dispatch>
$<TARGET_FILE:BlocksRuntime>
Expand Down
1 change: 1 addition & 0 deletions apinotes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ add_custom_target("copy_apinotes" ALL
COMMENT "Copying API notes to ${output_dir}"
SOURCES "${sources}")

add_dependencies(compiler copy_apinotes)
swift_install_in_component(DIRECTORY "${output_dir}"
DESTINATION "lib/swift/"
COMPONENT compiler)
2 changes: 2 additions & 0 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ set(SWIFT_BENCH_MODULES
single-source/Exclusivity
single-source/ExistentialPerformance
single-source/Fibonacci
single-source/FindStringNaive
single-source/FlattenList
single-source/FloatingPointParsing
single-source/FloatingPointPrinting
Expand Down Expand Up @@ -151,6 +152,7 @@ set(SWIFT_BENCH_MODULES
single-source/SetTests
single-source/SevenBoom
single-source/Sim2DArray
single-source/SortArrayInClass
single-source/SortIntPyramids
single-source/SortLargeExistentials
single-source/SortLettersInPlace
Expand Down
24 changes: 11 additions & 13 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,17 @@ The following build options are available:

The following build targets are available:

1. `swift-benchmark-macosx-x86_64`
2. `swift-benchmark-iphoneos-arm64`
3. `swift-benchmark-iphoneos-armv7`
4. `swift-benchmark-appletvos-arm64`
5. `swift-benchmark-watchos-armv7k`
* `swift-benchmark-macosx-x86_64`
* `swift-benchmark-iphoneos-arm64`
* `swift-benchmark-iphoneos-armv7`
* `swift-benchmark-appletvos-arm64`
* `swift-benchmark-watchos-armv7k`

Build steps (with example options):

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

Benchmark binaries are placed in `bin`.

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

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

To build against the installed Xcode, simply omit SWIFT_EXEC:

cmake ../benchmark -G Ninja
cmake <src>/benchmark -G Ninja
ninja swift-benchmark-iphoneos-arm64

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

cmake ../benchmark -G Ninja -DSWIFT_BENCHMARK_USE_OS_LIBRARIES=ON
cmake <src>/benchmark -G Ninja -DSWIFT_BENCHMARK_USE_OS_LIBRARIES=ON
ninja swift-benchmark-iphoneos-arm64

This will reflect the performance of the Swift standard library
Expand Down
185 changes: 185 additions & 0 deletions benchmark/single-source/FindStringNaive.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
//===--- FindStringNaive.swift --------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2019 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

import TestsUtils

// Mini benchmark implementing a naive String search algorithm that
// at the moment shows a lot of ARC traffic.
let t: [BenchmarkCategory] = [.String, .refcount]
let N = 100

var longStringFoFoFoFox: String?
var longArrayFoFoFoFox: [UInt8]?

public let FindStringNaive = [
BenchmarkInfo(
name: "FindString.Loop1.Substring",
runFunction: runBenchLoop1Substring,
tags: t,
setUpFunction: {
longStringFoFoFoFox = String(repeating: "fo", count: 5_000) + "fox <-- needle"
}),
BenchmarkInfo(
name: "FindString.Rec3.String",
runFunction: runBenchRecursive3String,
tags: t,
setUpFunction: {
longStringFoFoFoFox = String(repeating: "fo", count: 500) + "fox <-- needle"
}),
BenchmarkInfo(
name: "FindString.Rec3.Substring",
runFunction: runBenchRecursive3Substring,
tags: t,
setUpFunction: {
longStringFoFoFoFox = String(repeating: "fo", count: 500) + "fox <-- needle"
}),
BenchmarkInfo(
name: "FindString.Loop1.Array",
runFunction: runBenchLoop1Array,
tags: t,
setUpFunction: {
longArrayFoFoFoFox = []
longArrayFoFoFoFox!.reserveCapacity(1_100_000)
for _ in 0 ..< 500_000 {
longArrayFoFoFoFox!.append(contentsOf: "fo".utf8)
}
longArrayFoFoFoFox!.append(contentsOf: "fox <-- needle".utf8)
}),
BenchmarkInfo(
name: "FindString.Rec3.Array",
runFunction: runBenchRecursive3ArrayOfUTF8,
tags: t,
setUpFunction: {
longArrayFoFoFoFox = []
longArrayFoFoFoFox!.reserveCapacity(11_000)
for _ in 0 ..< 5_000 {
longArrayFoFoFoFox!.append(contentsOf: "fo".utf8)
}
longArrayFoFoFoFox!.append(contentsOf: "fox <-- needle".utf8)
}),
]

func findOne<S: StringProtocol>(
_ string: S,
needle: Character
) -> String.Index? {
var index = string.startIndex
while index < string.endIndex {
let nextIndex = string.index(after: index)
if string[index] == needle {
return index
}
index = nextIndex
}
return nil
}

func findThreeRecursive<S: StringProtocol>(
_ string: S,
needle1: Character,
needle2: Character?,
needle3: Character?
) -> String.Index? {
var index = string.startIndex
while index < string.endIndex {
let nextIndex = string.index(after: index)
if string[index] == needle1 {
// Check subsequent needles recursively (if applicable)
guard let needle2 = needle2 else { return index }

if findThreeRecursive(
string[nextIndex...].prefix(2), needle1: needle2, needle2: needle3, needle3: nil
) == nextIndex {
return index
}
}
index = nextIndex
}
return nil
}

func findOneOnUTF8Collection<Bytes: Collection>(
_ string: Bytes,
needle: UInt8
) -> Bytes.Index? where Bytes.Element == UInt8 {
var index = string.startIndex
while index < string.endIndex {
let nextIndex = string.index(after: index)
if string[index] == needle {
return index
}
index = nextIndex
}
return nil
}

func findThreeOnUTF8Collection<Bytes: Collection>(
_ string: Bytes,
needle1: UInt8,
needle2: UInt8?,
needle3: UInt8?
) -> Bytes.Index? where Bytes.Element == UInt8 {
var index = string.startIndex
while index < string.endIndex {
let nextIndex = string.index(after: index)
if string[index] == needle1 {
// Check subsequent needles recursively (if applicable)
guard let needle2 = needle2 else { return index }

if findThreeOnUTF8Collection(
string[nextIndex...].prefix(2), needle1: needle2, needle2: needle3, needle3: nil
) == nextIndex {
return index
}
}
index = nextIndex
}
return nil
}

@inline(never)
func runBenchLoop1Substring(iterations: Int) {
for _ in 0 ..< iterations {
precondition(findOne(longStringFoFoFoFox![...], needle: "x") != nil)
}
}

@inline(never)
func runBenchLoop1Array(iterations: Int) {
for _ in 0 ..< iterations {
precondition(findOneOnUTF8Collection(longArrayFoFoFoFox!, needle: UInt8(ascii: "x")) != nil)
}
}

@inline(never)
func runBenchRecursive3Substring(iterations: Int) {
for _ in 0 ..< iterations {
precondition(findThreeRecursive(longStringFoFoFoFox![...], needle1: "f", needle2: "o", needle3: "x") != nil)
}
}

@inline(never)
func runBenchRecursive3String(iterations: Int) {
for _ in 0 ..< iterations {
precondition(findThreeRecursive(longStringFoFoFoFox!, needle1: "f", needle2: "o", needle3: "x") != nil)
}
}

@inline(never)
func runBenchRecursive3ArrayOfUTF8(iterations: Int) {
for _ in 0 ..< iterations {
precondition(findThreeOnUTF8Collection(longArrayFoFoFoFox!,
needle1: UInt8(ascii: "f"),
needle2: UInt8(ascii: "o"),
needle3: UInt8(ascii: "x")) != nil)
}
}
Loading