Commit Graph

19 Commits

Author SHA1 Message Date
Alastair Houghton
6e28716319 [Concurrency] Address some review comments.
Tweaked diagnostic to use a string instead of a type.  Renamed the
feature in `FeatureAvailability.def` (and added the `TaskExecutor`
feature to 6.2).  Also fixed the `swift_getActiveExecutor()`
function to return the main executor only when on the main thread.

rdar://141348916
2025-03-28 10:15:14 +00:00
Alastair Houghton
47fa71787f Revert "Merge pull request #80224 from glessard/revert-79789-custom-executors"
This reverts commit 06f6358067, reversing
changes made to 033f6679e8.
2025-03-28 10:15:07 +00:00
Alastair Houghton
8b15b05c63 Revert "[Concurrency] Provide a Swift interface for custom main and global executors." 2025-03-22 02:38:11 -07:00
Alastair Houghton
55afa47bea [Concurrency] More work on the custom executor implementation.
Added an `-executor-factory` argument to the compiler to let you safely
specify the executors you wish to use (by naming a type that returns
them).

Also added some tests of the new functionality.

rdar://141348916
2025-03-13 13:34:41 +00:00
Alejandro Alonso
b3ae982d36 Update FeatureAvailability.def 2025-01-13 18:52:05 -08:00
Mykola Pokhylets
5ac1cba8d1 Handle versioning of the IsolatedDeinit feature 2024-12-12 16:41:02 +09:00
John McCall
d8d70d9aac Add support for creating a task with a self-consuming task function.
Not used yet.
2024-11-15 22:51:57 -05:00
Dario Rexin
c0c31c0613 [IRGen] Set minimum runtime availability version for CVW
rdar://139375022

CVW should not be generated when the deployment target does not have the necessary runtime functions.
2024-11-13 22:36:15 -08:00
Nate Chandler
b87b42cd1e [CoroutineAccessors] If available, provide old ABI
If the feature is enabled, base the requirement for the underscored
accessors on the availability of the non-underscored accessors.  If the
(non-underscored) accessor's was available earlier than the feature,
interpret that to mean that the underscored version was available in
that earlier version, and require the underscored version.  The goal is
to ensure that the ABI is preserved, so long as the simplest migration
is done (namely, deleting the underscores from the old accessors).

For modify2, cache the required-ness in the same way that it is cached
for modify.
2024-10-29 14:24:36 -07:00
Alejandro Alonso
f2f82a7de6 Add initRawStructMetadata2 for safety 2024-09-04 15:13:51 -07:00
Alejandro Alonso
9faf615c88 Add runtime availability checking for value generics 2024-09-04 15:13:51 -07:00
Kavon Farvardin
04454054b7 NCGenerics: add availability checking
Not all runtimes can correctly operate with types that use noncopyable
generics. When the generic argument of a type is noncopyable, old
runtimes can't recognize that to correctly check conformances that may
be conditional on those arguments being Copyable, etc.

resolves rdar://126239335
2024-07-07 15:38:00 -07:00
Karoy Lorentey
e563f660bb [AST] Update availability of features targeting 6.0 2024-06-13 18:00:45 -07:00
Becca Royal-Gordon
1dceb24802 Diagnose resilient properties in objcImpl
…when the deployment target is not high enough to support them.
2024-04-30 12:03:46 -07:00
Erik Eckstein
ce33d47a4c stdlib: add the swift_clearSensitive runtime function 2024-04-09 12:01:10 +02:00
John McCall
0f076c0702 Fix metadata availability testing for parameterized existentials
and implement it for @isolated(any) function types.

The existing testing was pretty broken: we were diagnosing all sorts
of things that don't require type metadata (like using a tuple with
an extended existential in a value position in an API signature)
and not diagnosing several things that do (like covariant function
conversions that erase types).  There's therefore some risk to this
patch, but I'm not too worried because needing metadata like this is
pretty uncommon, and it's likely that programs won't build correctly
anyway --- it'll just get caught by the linker instead of the compiler.
2024-02-29 22:14:49 -05:00
John McCall
69c8f53e76 [NFC] Remove "Runtime" from this feature name to avoid confusion 2024-02-29 03:00:43 -05:00
Alastair Houghton
76f2389fd9 [IRGen][Test] Use the new availability support.
We need to only generate references to `_swift_exceptionPersonality`
if we're building for a new enough runtime.  The previous code was
good on Darwin, but would have resulted in build problems on Linux.

rdar://120952971
2024-02-06 16:21:11 +00:00
Alastair Houghton
c2c4f87ccb [AST] Improve availability support.
Use `.def` files to generate code for feature availability and runtime
version to OS version mappings.

rdar://121522431
2024-02-02 16:14:26 +00:00