Commit Graph

1766 Commits

Author SHA1 Message Date
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
swift-ci
0f4ef3080e Merge remote-tracking branch 'origin/main' into rebranch 2022-05-26 08:53:05 -07:00
QuietMisdreavus
bf66515858 add default values for SymbolGraphOptions (#59037)
rdar://93780666
2022-05-26 09:33:51 -06:00
Ben Barham
92b6dd24c2 Merge branch 'main' into manually-merge-main 2022-05-25 15:55:35 -07:00
Robert Widmann
663722d892 Parameterized Existential Types Are Enabled By Default
See https://forums.swift.org/t/accepted-se-0353-constrained-existential-types/57560
2022-05-25 09:50:36 -07:00
swift-ci
f6cdcc736d Merge remote-tracking branch 'origin/main' into rebranch 2022-05-18 15:18:15 -07:00
Alexis Laferrière
6c287b2b41 Merge pull request #58935 from xymus/swiftmodule-per-sdk-soft-reject
[Serialization] Soft-reject swiftmodules built against a different SDK on tagged compilers
2022-05-18 15:09:48 -07:00
swift-ci
75f7d2e957 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-16 14:13:30 -07:00
Ben Barham
47721d25e6 Merge pull request #42394 from DavidGoldman/hermeticindexstore
Support hermetic indexing information + introduce `-file-prefix-map`
2022-05-16 14:09:25 -07:00
Alexis Laferrière
c8059a09e9 [Serialization] Soft-reject swiftmodules built against a different SDK
Change the way swiftmodules built against a different SDK than their
clients are rejected. This makes them silently ignored when the module
can be rebuilt from their swiftinterface, instead of reporting a hard
error.

rdar://93257769
2022-05-16 13:22:35 -07:00
David Goldman
c232ed2913 Support hermetic indexing information
Swiftc port of https://github.com/apple/llvm-project/pull/4207.

This introduces a new flag, `-file-prefix-map` which can be used
instead of the existing `-debug-prefix-map` and `-coverage-prefix-map`
flags, and also remaps paths in index information currently.
2022-05-16 11:00:14 -04:00
swift-ci
f125662aca Merge remote-tracking branch 'origin/main' into rebranch 2022-05-10 12:53:39 -07:00
Slava Pestov
bfcaa39d37 Remove the GenericSignatureBuilder
Resolves rdar://problem/88136582.
2022-05-10 11:47:06 -04:00
swift-ci
7eff6ccfec Merge remote-tracking branch 'origin/main' into rebranch 2022-05-10 05:33:46 -07:00
Slava Pestov
f39372b33d RequirementMachine: Turn off redundant requirement warnings by default and add -warn-redundant-requirements frontend flag 2022-05-10 01:49:56 -04:00
Ben Barham
114b4d96e4 [next] Use new VersionTuple API
The `VersionTuple` API was changed llvm/llvm-project
219672b8dd06c4765185fa3161c98437d49b4a1b to return `VersionTuple`
from `get*Version` rather than pass in major, minor, and subminor output
parameters. Update uses to the new API.

Note that `getMacOSXVersion` is slightly different in that it returns a
boolean while taking a `VersionTuple` output parameter to match its
previous behaviour. There doesn't seem to be any use that actually
checks this value though, so we should either update the API to return
an `Optional` and actually check it *or* remove the "failure" case and
return a `VersionTuple` like all the others.
2022-05-05 16:25:10 -07:00
Erik Eckstein
abb2da88e6 Add a flag -enable-default-cmo to enable default cross-module-optimization.
So far, the swift-frontend decided by itself if CMO can be enabled. This caused problems when used with an old driver, which doesn't consider CMO.
Now, the driver decides when to use default CMO by passing this flag to swift-frontend.
2022-04-29 18:22:55 +02:00
Evan Wilde
8b2ccd9ed5 Merge pull request #58429 from etcwilde/ewilde/disjunction-main-resolution
Use Disjunction Constraint to find main function
2022-04-28 09:31:45 -07:00
Egor Zhdan
ca44a67a99 [Frontend] NFC: fix compiler warning
```
[218/807] Building CXX object lib/Frontend/CMakeFiles/swiftFrontend.dir/CompilerInvocation.cpp.o
/home/egorzh/swift/swift/lib/Frontend/CompilerInvocation.cpp:804:28: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
  Opts.EnableCXXInterop |= Args.hasArg(OPT_enable_experimental_cxx_interop) |
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                            ||
/home/egorzh/swift/swift/lib/Frontend/CompilerInvocation.cpp:804:28: note: cast one or both operands to int to silence this warning
```
2022-04-28 14:24:35 +01:00
Evan Wilde
94e30a817e Revert "Add -async-main flag to favor asynchronous main"
This reverts commit da0a3311a5.
2022-04-26 16:29:45 -07:00
Doug Gregor
c1534d5af9 Merge pull request #42520 from DougGregor/rename-strict-concurrency-options 2022-04-21 00:26:34 -07:00
Zoe Carver
320e4c63cb Merge pull request #42511 from zoecarver/add-flag-import-as-computed-property 2022-04-20 22:47:21 -07:00
Doug Gregor
3316cf01f7 Merge pull request #41996 from DougGregor/implicit-open-by-default
[SE-0352] Implicit opening of existentials by default
2022-04-20 21:37:52 -07:00
Doug Gregor
5538068500 Rename -strict-concurrency=explicit to minimal
This makes it far more clear what the relative ordering of the options is.

Thanks, Jake!
2022-04-20 21:30:41 -07:00