Commit Graph

11880 Commits

Author SHA1 Message Date
Pavel Yaskevich
ec3b783380 [Diagnostics] Improve diagnostic for invalid conversion to AnyObject 2020-01-29 00:37:39 -08:00
swift-ci
98bd56e58d Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-28 11:03:20 -08:00
Ravi Kandhadai
566d574f4d Merge pull request #29501 from ravikandhadai/constexpr-binary-integer-description
[Constant Evaluator] Add support for BinaryInteger.description which converts an integer to a string
2020-01-28 11:01:47 -08:00
Ravi Kandhadai
c198c1a2aa [Constant Evaluator] Add support for BinaryInteger.description which
converts an integer to a string. This patch adds a @_semantics
annotation to the BinaryInteger.description function.
2020-01-27 21:13:50 -08:00
swift-ci
81a6a266aa Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-27 18:23:23 -08:00
David Ungar
a2df6b98f5 Merge pull request #29463 from davidungar/PBP-2-21-ICNR-on
[DNM, Incremental: Type-body-fingerprints on-by-default]
2020-01-27 18:03:38 -08:00
swift-ci
36849ea21b Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-27 16:43:23 -08:00
Robert Widmann
423bcdfcdd Merge pull request #29242 from CodaFi/smooth-as-sil-k
[NFC] Define SILGen Request Zone and GenerateSIL Request
2020-01-27 16:30:20 -08:00
David Ungar
8f4fd061f9 Use Optional for fingerprint 2020-01-27 15:14:46 -08:00
David Ungar
0a3be7575a unit tests compile 2020-01-27 15:14:46 -08:00
David Ungar
021a40a98f Coarse + prints -> warning, not error 2020-01-27 15:14:46 -08:00
David Ungar
d61f6f2f66 Changes to support per-type-body fingerprints. 2020-01-27 15:14:46 -08:00
swift-ci
906a7bc93f Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-27 05:23:22 -08:00
David Zarzycki
3c8fba0fca [AST] NFC: Fix -Wdeprecated-copy warning 2020-01-27 06:35:28 -05:00
Robert Widmann
b6fb6ed7ff Add type info for unique_ptr 2020-01-26 14:23:45 -08:00
Robert Widmann
6ec3ab94d2 [NFC] Define SILGen Request Zone and GenerateSIL Request
Define a high-level request for SILGen and switch the high-level
entrypoint to vector through it.
2020-01-26 13:43:52 -08:00
swift-ci
126434e79c Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-25 14:44:33 -08:00
Robert Widmann
e626cfb378 Remove lazy member loading re-entrancy guards
Effectively revert #28907. The request evaluator will also catch re-entrancy here, and those cycles can be broken with NameLookupFlags::IgnoreNewExtensions.
2020-01-25 11:04:53 -08:00
Robert Widmann
b09c9957ad Reintroduce NameLookupFlags::IgnoreNewExtensions
Soft revert a09382c. It should now be safe to add this flag back as an optimization to specifically disable lazy member loading instead of all extension loading.

Push the flag back everywhere it was needed, but also push it into lookup for associated type members which will never appear in extensions.
2020-01-25 11:04:53 -08:00
Robert Widmann
26d8bad7c2 Add DirectLookupRequest 2020-01-25 11:04:53 -08:00
swift-ci
2fa9f63aa7 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-24 18:24:41 -08:00
nate-chandler
4bc78376aa Merge pull request #29442 from nate-chandler/generic-metadata-prespecialization-components/future-availability
[metadata prespecialization] Future availability.
2020-01-24 18:21:43 -08:00
Nate Chandler
23ff5f8964 [metadata prespecialization] Future availability.
Metadata prespecialization will be available after Swift 5.2.
2020-01-24 14:46:30 -08:00
swift-ci
6238289313 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-24 10:24:34 -08:00
Meghana Gupta
5285bf7200 Turn off speculative devirtualization by default. (#29359)
Turn off speculative devirtualization by default. Add a flag to support enabling the pass.
Fixes rdar://58778959 and rdar://58429282
2020-01-24 10:23:06 -08:00
Dan Zheng
8c17687e02 Merge pull request #29405 from dan-zheng/autodiff-upstream-sil-diff-param
[AutoDiff upstream] Add `@noDerivative` flag to `SILParameterInfo`.
2020-01-24 10:10:04 -08:00
Dan Zheng
2d08a3f7e2 [AutoDiff upstream] Add SIL derivative function type calculation. (#29396)
Add `SILFunctionType::getAutoDiffDerivativeFunctionType`.

It computes the derivative `SILFunctionType` for an "original"
`SILFunctionType`, given:

- Differentiability parameter indices
- Differentiability result index
- Derivative function kind
- Derivative function generic signature (optional)
- Other auxiliary parameters

Add doc comments explaining typing rules, preconditions, and other details.

Partially resolves TF-1124.
Unblocks upstreaming other SIL differentiable programming infrastructure.
2020-01-24 10:09:29 -08:00
Mike Ash
cd2b54f74e Merge branch 'master' into master-rebranch 2020-01-24 11:30:32 -05:00
Hamish Knight
ce7654423a Re-apply "Don't heap allocate for active requests" (#29391)
Re-apply "Don't heap allocate for active requests"
2020-01-24 07:16:35 -08:00
kelvin13
1715ebcf9d address more reviewed issues 2020-01-23 22:46:30 -06:00
Dan Zheng
a56e77a28a Lower AST @noDerivative attribute to SIL.
Add SILGen test.
2020-01-23 15:35:55 -08:00
Dan Zheng
ac48febfd4 Add @noDerivative flag to SILParameterInfo.
The `@noDerivative` attribute marks the non-differentiability parameters of a
`@differentiable` function type. All parameters except those marked with
`@noDerivative` are differentiability parameters.

For example, `@differentiable (Float, @noDerivative Float) -> Float` is only
differentiable with respect to its first parameter.

The `@noDerivative` attribute is represented as a
`SILParameterDifferentiability` bit on `SILParameterInfo`.

Add round-trip serialization tests.

Resolves TF-872.
2020-01-23 15:29:14 -08:00
swift-ci
b0d3f3a13c Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-23 14:24:57 -08:00
Suyash Srijan
74cfee1485 [Typechecker] Extended ambiguous none warning to cases as well (#29356) 2020-01-23 22:04:08 +00:00
swift-ci
ec55ec0bb5 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-23 11:03:41 -08:00
Hamish Knight
9027d52399 [AST] Fix friendship with AnyRequestBase
This was causing issues with MSVC. Have subclasses
be friends with all specializations of
AnyRequestBase, and define `getRawStorage` in
the base class to make it accessible to `friend`
top-level functions.
2020-01-23 11:03:33 -08:00
Hamish Knight
f081ae51d4 Revert "Revert "Don't heap allocate for active requests""
f8a1ad22e1
2020-01-23 11:03:32 -08:00
Saleem Abdulrasool
f8a1ad22e1 Revert "Don't heap allocate for active requests" 2020-01-23 08:33:31 -08:00
swift-ci
cbd174c46f Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-23 07:23:42 -08:00
Hamish Knight
5f4688d4d6 Merge pull request #29289 from hamishknight/the-requests-are-stacking-up
Don't heap allocate for active requests
2020-01-23 07:07:33 -08:00
swift-ci
4a1f9f9b04 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 23:24:37 -08:00
David Ungar
f696aabffb Merge pull request #29246 from davidungar/fine-grained-off-but-w-tests-rb
[Incremental] Fixes for fine-grained dependencies + tests for them, but off-by-default
2020-01-22 23:21:33 -08:00
kelvin13
2701012434 fix some reviewed issues 2020-01-22 21:56:47 -06:00
kelvin13
fb4bd68653 Merge branch 'master' into comparable-enums 2020-01-22 18:38:31 -06:00
swift-ci
2cbb8f4de9 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 15:23:52 -08:00
Xi Ge
7987725d10 AST: PlatformKind can use uint8_t as raw value 2020-01-22 13:29:38 -08:00
swift-ci
11550b4c0c Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 09:43:43 -08:00
Varun Gandhi
ae358842dc Revert "[NFC] Fix incorrect comment in ExtInfo's constructor."
This reverts commit f07ba79377.
2020-01-22 09:04:52 -08:00
Varun Gandhi
191b0d8c02 Revert "[AST] Add functionality for computing Clang types for SIL functions."
This reverts commit bfa2f98d95.
2020-01-22 09:04:52 -08:00
Varun Gandhi
29cc1b6195 Revert "[AST] Store Clang type in SILFunctionType for @convention(c) functions."
This reverts commit 5f45820755.
2020-01-22 09:04:52 -08:00