Commit Graph

1839 Commits

Author SHA1 Message Date
Allan Shortlidge
76bfd68e98 Frontend: Enable -target-min-inlining-version min for API modules by default.
Resolves rdar://67975153.
2022-07-25 15:21:12 -07:00
swift-ci
1611ec3dc3 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-22 20:53:51 -07:00
Jonathan Penn
be5babf28c Add experimental flag to turn on just opaque type erasure (#60172)
This was already enabled as part of `-enable-implicit-dynamic` but this
new flag allows turning on opaque type erasure all by itself whether or
not `dynamic` is added explicitly.

rdar://97375478
2022-07-22 23:43:22 -04:00
Arnold Schwaighofer
d51a465ee1 IRGen: Enable the new llvm pass manager
rdar://96687157
2022-07-22 11:52:44 -07:00
swift-ci
b99996dbbd Merge remote-tracking branch 'origin/main' into rebranch 2022-07-21 13:37:34 -07:00
Artem Chikin
85b767dea2 Merge pull request #60139 from artemcm/AddConstValueExtractionPathHandling
Add supplementary output path handling for extracted compile-time-known values
2022-07-21 13:19:42 -07:00
swift-ci
da96ee6bd2 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-20 12:38:23 -07:00
Doug Gregor
0fdba62bd8 Merge pull request #59055 from DougGregor/future-feature
[SE-0362] Piecemeal adoption of upcoming language improvements
2022-07-20 12:26:00 -07:00
Doug Gregor
a317fad88d Add -enable-upcoming-feature X command-line argument.
Introduce the `-enable-upcoming-feature X` command-line argument to
allow one to opt into features that will be enabled in an upcoming language
mode. Stage in several features this way (`ConciseMagicFile`,
`ForwardTrailingClosures`, `BareSlashRegexLiterals`).
2022-07-19 21:20:12 -07:00
Artem Chikin
b1fee939f1 Add supplementary output path handling for extracted compile-time-known values 2022-07-19 16:24:26 -07:00
swift-ci
c84de33192 Merge remote-tracking branch 'origin/main' into rebranch 2022-07-19 07:33:14 -07:00
Arnold Schwaighofer
599a37450b Add frontend flag -enable-new-llvm-pass-manager to enable new llvm pass manager 2022-07-15 13:11:37 -07:00
swift-ci
7382a9c41e Merge remote-tracking branch 'origin/main' into rebranch 2022-07-11 07:53:46 -07:00
Nate Chandler
b03904d704 [Freestanding] Use task-to-thread concurrency model.
Defined SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY to describe
whether the standard library will use the task-to-thread model for
concurrency.  It is true only for freestanding non-Darwin stdlibs.

When it is true, SWIFT_CONCURRENCY_TASK_TO_THREAD_MODEL is defined
during stdlib compilation of both Swift and C++ sources.

Added an option to LangOptions to specify which concurrency model is
used, either standard or task-to-thread.  When
SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY is true, the model is
specified to be task-to-thread.
2022-07-06 11:51:14 -07:00
swift-ci
35a2f137ce Merge remote-tracking branch 'origin/main' into rebranch 2022-07-05 17:54:14 -07:00
Holly Borla
dbc8307b64 Merge pull request #59829 from hborla/enable-bound-generic-extensions
[SE-0361] Enable bound generic extensions.
2022-07-05 17:38:59 -07:00
Holly Borla
01d46340e1 [SE-0361] Remove the feature flag for bound generic extensions. 2022-06-30 17:24:38 -07:00
swift-ci
cf93f5718f Merge remote-tracking branch 'origin/main' into rebranch 2022-06-30 08:54:09 -07:00
Holly Borla
0597b8db04 Merge pull request #59740 from hborla/remove-existential-opening-option
[LangOptions] Remove the option to enable/disable implicit existential opening.
2022-06-30 08:53:13 -07:00
swift-ci
2183c1d21a Merge remote-tracking branch 'origin/main' into rebranch 2022-06-29 15:13:35 -07:00
Allan Shortlidge
2515f7a58d Frontend: Introduce the -enable-experimental-ad-hoc-availability flag.
When developing a module for an OS or SDK, one may use declarations from other modules that were recently introduced in the in-development OS. Those declarations will be annotated as available at the deployment target of the client module and yet the symbols for that declaration are not available in all development builds of that OS. If the module strongly links those symbols, it will crash on older development builds of the OS. The `-enable-experimental-ad-hoc-availability` flag is designed to give developers the option of weakly linking all symbols in other modules that were introduced at the deployment target.

This change introduces the basic change in linking behavior but does not address typechecking. Use of the declarations that are made unavailable in this mode will need to be diagnosed and developers will need a way to detect the unavailability at runtime before use.

Resolves rdar://96011550
2022-06-29 11:44:07 -07:00
Holly Borla
6e8a581b42 [LangOptions] Remove the option to enable/disable implicit existential
opening.
2022-06-27 18:03:20 -07:00
swift-ci
bc8cecbd9a Merge remote-tracking branch 'origin/main' into rebranch 2022-06-22 22:13:18 -07:00
Erik Eckstein
24d077e78b IRGen: re-enable generate static arrays in read-only data sections.
So far, static arrays had to be put into a writable section, because the isa pointer and the (immortal) ref count field were initialized dynamically at the first use of such an array.

But with a new runtime library, which exports the symbols for the (immortal) ref count field and the isa pointer, it's possible to put the whole array into a read-only section. I.e. make it a constant global.

rdar://94185998

This reverts the revert commit df353ff3c0.
Also, I added a frontend option to disable this optimization: `-disable-readonly-static-objects`
2022-06-21 18:30:42 +02:00
swift-ci
e0b07a15df Merge remote-tracking branch 'origin/main' into rebranch 2022-06-16 21:53:49 -07:00
Zoe Carver
59a9e282cd Merge pull request #59510 from zoecarver/remove-enable-interop-pt-2 2022-06-16 21:40:21 -07:00
zoecarver
57f721a2f1 [cxx-interop] Remove "enable-cxx-interop" flag again. 2022-06-16 18:02:24 -07:00
Ben Barham
dee08e0ea9 [next] Add Default argument for hasFlag
llvm/llvm-project removed the default for the `Default` argument in
522712e2d241ea33575a9c7a60ad582634f04f0d. Specify it directly in the
call to `hasFlag`.
2022-06-14 14:29:34 -07:00
swift-ci
18f75b981d Merge remote-tracking branch 'origin/main' into rebranch 2022-06-13 11:33:01 -07:00
Richard Wei
3396ede366 Merge pull request #42611 from rxwei/string-processing-default
Enable string processing by default.
2022-06-13 11:16:05 -07:00
Richard Wei
94e8f5393e Enable string processing by default.
Make frontend flag `-enable-experimental-string-processing` default to true.
2022-06-12 20:25:16 -07:00
swift-ci
7cb90dc351 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-10 15:33:41 -07:00
Arnold Schwaighofer
821ba47079 IRGen: Add a frontend option to force single LLVM module emission in multithreaded mode
This allows to experiment with single module LLVM emission without
having to change drivers that expect multiple output files.

rdar://94744623
2022-06-10 09:46:07 -07:00
swift-ci
7033e33aa3 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-31 14:35:31 -07:00
Slava Pestov
b45e0d1cda IRGen: Add -enable/disable-round-trip-debug-types flag, on by default in asserts builds 2022-05-31 14:45:59 -04:00
swift-ci
870cde61e8 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-31 06:54:14 -07:00
Doug Gregor
6267513dab Add experimental feature for AdditiveArithmetic derived conformances 2022-05-30 21:28:32 -07:00
Doug Gregor
22ccb3fc3f Introduce experimental features for autodiff options 2022-05-30 21:26:17 -07:00
Doug Gregor
2598aa5405 Add experimental feature for bound generic extensions 2022-05-30 21:09:33 -07:00
swift-ci
d32d3311ab Merge remote-tracking branch 'origin/main' into rebranch 2022-05-30 11:14:36 -07:00
Doug Gregor
3cf576da23 Refactor bare slash regex literals as a future feature 2022-05-30 08:33:46 -07:00
Doug Gregor
2fbe202146 Introduce FUTURE_FEATURE definitions for features staged in Swift 6.
Using the same feature set logic as experimental features, provide
feature names for "future" features, which are changes that will
become available with Swift 6. Use the feature check when determining
whether to implementation the feature instead of a language version
check, and map existing flags for these features (when available) over
to the feature set.

As an internal implementation detail, this makes it easier to reason
about when specific features are enabled (or not). If we decide to go
with piecemeal adoption support for features, it can provide an
alternative path to enabling features that feeds this mechanism.
2022-05-30 08:32:56 -07:00
swift-ci
4ee528a886 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-27 15:14:25 -07:00
Doug Gregor
8da6caeccd Add experimental feature for type witness system inference 2022-05-27 12:34:53 -07:00
Doug Gregor
333ae3f830 Add experimental feature for one-way closure parameters 2022-05-27 11:52:29 -07:00
Doug Gregor
b012270fca Adopt experimental-feature infrastructure for move-only feature 2022-05-26 14:21:26 -07:00
Doug Gregor
37dbf23ba2 Adopt experimental feature approach for flow-sensitive concurrency captures 2022-05-26 13:56:21 -07:00
Doug Gregor
0de5d7818d Make named opaque types an experimental feature 2022-05-26 13:44:08 -07:00
Doug Gregor
a523473315 Make static assertions an experimental feature 2022-05-26 13:43:36 -07:00
Doug Gregor
6d82448dc8 Add -enable-experimental-feature X for experimental features.
Experimental features can only be enabled in non-production (+Asserts)
builds. They can be detected with `hasFeature` in the same manner as
"future" features.

The `-enable-experimental-feature X` flag will also look for future
features by that name, so that when an experimental feature becomes an
accepted future feature, it will still be enabled in the same manner.

Switch variadic generics over to this approach, eliminating the
specific LangOption for it.
2022-05-26 11:50:39 -07:00