Michael Gottesman
d0219b6f7a
[stlextras] Add overloads for binary_search that take containers.
2019-11-15 12:57:39 -08:00
Andrew Trick
84e1d7e84d
Merge pull request #28273 from atrick/escape-initializePointsTo
...
Cleanup EscapeAnalysis::ConnectionGraph::initializePointsTo.
2019-11-15 11:03:45 -08:00
Andrew Trick
9a71f235d7
Merge pull request #27444 from atrick/fix-sink-address
...
Generalize and fix SinkAddressProjections.
swift-DEVELOPMENT-SNAPSHOT-2019-11-15-a
2019-11-15 09:54:04 -08:00
Andrew Trick
e66e033b00
Cleanup EscapeAnalysis::ConnectionGraph::initializePointsTo.
...
Remove cruft that I added in the previous commit. This eliminates
unnecessary cleverness so initializePointsTo is now very simple.
Add hand-coded SIL test cases to somewhat verify that the new
algorithm works.
2019-11-15 09:11:35 -08:00
Nate Cook
7c0ed24867
[stdlib] Document Windows implementation of SystemRandomNumberGenerator ( #28268 )
2019-11-15 10:38:44 -06:00
Saleem Abdulrasool
724ff1ea0a
Merge pull request #28262 from compnerd/sourcekit-link-libraries
...
SourceKit: convert `LINK_LIBS` to `target_link_libraries`
2019-11-15 08:18:18 -08:00
Slava Pestov
9826aaa9ed
Merge pull request #28275 from slavapestov/check-where-clause-non-generic-type
...
Check generic requirements of parent context when realizing non-generic types
2019-11-15 08:46:04 -05:00
Doug Gregor
0b6ef0d4d1
Merge pull request #28276 from DougGregor/constraint-solver-expr-ctor
...
[Constraint solver] Remove expression from the constructor.
2019-11-14 22:48:07 -08:00
swift-ci
05405351b7
Merge pull request #28274 from DougGregor/bool-raw-value
2019-11-14 21:52:10 -08:00
Doug Gregor
abf41e73a8
[Constraint system] Look for parent/depth info in base constraint system.
...
Look first in the base constraint system for this information, so it
only gets built once in the normal case.
2019-11-14 20:35:07 -08:00
Doug Gregor
24b47b5673
[Constraint solver] Sink Expr::getPreorderIndexMap() into its client.
2019-11-14 20:33:00 -08:00
Daniel Rodríguez Troitiño
9884e50193
Merge pull request #28280 from drodriguez/msvc-wants-you-to-move
...
[msvc] std::move the pointer for the method that requires an rvalue.
2019-11-14 20:01:11 -08:00
Xi Ge
2fbb0c1170
Merge pull request #28272 from nkcsgexi/let-var-is-file
...
ABI/API checker: don't complain about changing var to let or vice versa
2019-11-14 18:22:21 -08:00
swift-ci
16ea9fa3f0
Merge pull request #28277 from gottesmm/pr-fe75266370825e5d95381c70f6bf20f16b738542
2019-11-14 18:20:30 -08:00
Daniel Rodríguez Troitiño
62c0bb8258
[msvc] std::move the pointer for the method that requires an rvalue.
...
MSVC was chocking with the given syntax, saying that
'swift::DefaultArgumentInitializer *' wasn't the expected 'swift::Initializer *&&'.
2019-11-14 18:11:24 -08:00
Doug Gregor
21a7fba895
More tests for Bool raw values of enums
2019-11-14 17:22:09 -08:00
Doug Gregor
9243c61244
Handle Boolean literals as enum raw values.
...
Fixes rdar://problem/55384273.
2019-11-14 17:22:09 -08:00
Michael Gottesman
b30efa7566
[pmo] Refactor addHandOffCopyDestroysForPhis to be able to take a load or load_borrow.
...
Just some small changes to types. NFC.
2019-11-14 16:46:11 -08:00
David Smith
bf78d4adec
Merge pull request #28271 from Catfish-Man/mutantmark
...
Add benchmarks for mutable copies of bridged Swift Strings
2019-11-14 16:43:05 -08:00
Jordan Rose
6db9a69e94
[docs] Move all the futurey bits of LibraryEvolution.rst to a new file ( #28007 )
...
It's not /exactly/ a manifesto but it's close enough.
2019-11-14 16:24:46 -08:00
Jordan Rose
954a14261f
Merge pull request #27943 from jrose-apple/eevee
...
[docs] Modernize LibraryEvolution.rst, part 1
2019-11-14 16:24:20 -08:00
Daniel Rodríguez Troitiño
a30968f9ea
Merge pull request #28267 from drodriguez/windows-fix-pcm-emit-and-import-test
...
[windows] Adapt pcm-emit-and-import for Windows separators.
2019-11-14 16:21:47 -08:00
Andrew Trick
38c29e231e
Generalize and fix SinkAddressProjections.
...
Fixes a potential real bug in the case that SinkAddressProjections moves
projections without notifying SimplifyCFG of the change. This could
fail to update Analyses (probably won't break anything in practice).
Introduce SILInstruction::isPure. Among other things, this can tell
you if it's safe to duplicate instructions at their
uses. SinkAddressProjections should check this before sinking uses. I
couldn't find a way to expose this as a real bug, but it is a
theoretical bug.
Add the SinkAddressProjections functionality to the BasicBlockCloner
utility. Enable address projection sinking for all BasicBlockCloner
clients (the four different kinds of jump-threading that use it). This
brings the compiler much closer to banning all address phis.
The "bugs" were originally introduced a week ago here:
commit f22371bf0b (fork/fix-address-phi, fix-address-phi)
Author: Andrew Trick <atrick@apple.com >
Date: Tue Sep 17 16:45:51 2019
Add SIL SinkAddressProjections utility to avoid address phis.
Enable this utility during jump-threading in SimplifyCFG.
Ultimately, the SIL verifier should prevent all address-phis and we'll
need to use this utility in a few more places.
Fixes <rdar://problem/55320867> SIL verification failed: Unknown
formal access pattern: storage
2019-11-14 16:11:00 -08:00
Saleem Abdulrasool
5268ce46e6
Merge pull request #28270 from compnerd/sourcekit-simplify
...
Simplify SourceKit CMake
2019-11-14 15:43:50 -08:00
Doug Gregor
2d915f60ab
[Constraint solver] Remove expression from the constructor.
...
Rather than setting up the constraint solver with a single expression
(that gets recorded for parents/depths), record each expression that
goes through constraint generation.
2019-11-14 15:41:38 -08:00
Doug Gregor
d6619e554e
Merge pull request #18705 from DougGregor/bridge-object-ref-count
...
[AST] BridgeObject uses ReferenceCounting::Bridge even without ObjC interop
2019-11-14 15:36:21 -08:00
Doug Gregor
9b9aa2377d
[Constraint solver] Lazily populate the expression depth/index map.
2019-11-14 15:29:40 -08:00
Slava Pestov
0e06792642
Add regression test for SR-10201
2019-11-14 18:26:52 -05:00
Slava Pestov
54155fe290
Sema: Check generic requirements of parent context when realizing non-generic types
...
When realizing a type like Foo<A>.Bar, we have to account for the
possibility that Bar is defined in a constrained extension of Foo,
and has generic requirements beyond those that Foo itself places
on 'A'.
Previously we only handled this for types referenced from the
constraint system as part of openUnboundGenericType(), so we were
allowing invalid types through in type context.
Add the right checking to applyGenericArguments() to close the
hole. Note that the old code path still exists in the constraint
solver; it is used for member accesses on metatype bases only.
Fixes <https://bugs.swift.org/browse/SR-10466 >.
2019-11-14 18:26:43 -05:00
Slava Pestov
2d5d8e397e
Sema: Clean up applyGenericArguments() and friends
2019-11-14 18:26:43 -05:00
Doug Gregor
6b8d54df0c
Merge pull request #20795 from DougGregor/sr-8767
...
[Test] Add tests from SR-8767 / rdar://problem/44522298.
2019-11-14 15:21:13 -08:00
swift-ci
e68ab43a97
Merge pull request #20474 from tinysun212/pr-swiftc-cygwin-3
2019-11-14 15:14:32 -08:00
Doug Gregor
01f203a54d
[Constraint system] Sink Expr::getDepthMap() into its one client.
...
NFC. It'll be easier to refactor this when it's not an API on Expr.
2019-11-14 15:02:58 -08:00
David Smith
9188dd6994
Add benchmarks for mutable copies of bridged Swift Strings
2019-11-14 14:51:02 -08:00
Hamish Knight
1be22c5d48
[Sema] Requestify default argument type checking ( #27756 )
...
[Sema] Requestify default argument type checking
2019-11-14 14:09:03 -08:00
Xi Ge
c8ce5b304c
ABI/API checker: don't complain about changing var to let or vice versa
...
The tool diagnoses the removal of getter/setter for properties, so complaining about the keyword change can be redundant.
rdar://problem/57201030
2019-11-14 13:59:26 -08:00
Holly Borla
5bb50068ac
Merge pull request #28243 from hborla/missing-generic-args-refactoring
...
[ConstraintSystem] Missing generic args/hole refactoring
2019-11-14 13:48:40 -08:00
Saleem Abdulrasool
717c4d3ebf
SourceKit: remove LINK_LIBS (NFC)
...
This removes the custom `LINK_LIBS` in favour of
`target_link_libraries`. This simplifies the custom functions that we
have for adding libraries, makes it easier to query the information from
ninja and will allow us to slowly remove more of the custom logic for
building the products.
2019-11-14 13:41:01 -08:00
Robert Widmann
8a61284dbb
Merge pull request #28266 from CodaFi/verb-check
...
[Docs] Fix typo in HighLevelSILOptimizations.rst.
2019-11-14 13:27:29 -08:00
Saleem Abdulrasool
7722d43291
build: simplify source file handling for sourcekitdAPI
...
Avoid unnecessary list handling for the sources for sourcekitdAPI,
inline the single use of the list and appending of the sources.
2019-11-14 13:24:22 -08:00
swift-ci
29cc760ce5
Merge pull request #27569 from Azoy/wheres-my-type-metadata
2019-11-14 12:58:28 -08:00
swift-ci
0103fe1eac
Merge pull request #28265 from DougGregor/diagnose-ambiguity-with-fixes-without-expr
2019-11-14 12:57:32 -08:00
Hamish Knight
3c05acac15
Address review feedback
...
Rename getDefaultArgumentInitContextCached,
and have it return an Optional<Initializer *>.
2019-11-14 12:51:04 -08:00
Daniel Rodríguez Troitiño
0718dc9f87
[windows] Adapt pcm-emit-and-import for Windows separators.
2019-11-14 12:41:25 -08:00
Robert Widmann
31461974c8
Merge pull request #28264 from CodaFi/command-and-control
...
[Gardening] Clean up after #16227
2019-11-14 12:41:09 -08:00
swift-ci
0100d7ceb4
Merge pull request #28263 from CodaFi/a-flock-of-seagulls
2019-11-14 12:25:04 -08:00
swift-ci
0a7c93dbd4
Merge pull request #14011 from noahsark769/noahsark769-DerivedConformances-typo-fix
2019-11-14 12:10:13 -08:00
swift-ci
d5023558af
Merge pull request #19048 from kitasuke/fix_typo_of_marked_uninitialized
2019-11-14 11:50:28 -08:00
Andrew Trick
1813b8be14
Merge pull request #28261 from atrick/check-partialapply
...
Add support in SILLoop::canDuplicate for PartialApplyInst.
2019-11-14 11:36:40 -08:00
own2pwn
ae7723a618
[Docs] Fix typo in HighLevelSILOptimizations.rst.
...
`nonelement` -> `non-element`
2019-11-14 11:04:57 -08:00