Commit Graph

21665 Commits

Author SHA1 Message Date
Holly Borla
966269d31a [Features] Promote IsolatedAny and its alias to a language feature.
The proposal is accepted and implemented for Swift 6.0.
2024-06-18 22:09:16 -07:00
Michael Gottesman
05124286c3 Merge pull request #74149 from gottesmm/pr-2808d3e61fa0b5b0dea4b8e7650b69cede701624
[concurrency] Mark the global _emptyDequeStorage as nonisolated(unsafe).
2024-06-18 16:42:38 -07:00
Alejandro Alonso
87a8edb368 Microoptimize _low and _high and remove else branch
Update UInt128.swift
2024-06-18 16:08:41 -07:00
Alejandro Alonso
f8f7d0c6d3 Make _low and _high public 2024-06-18 15:03:30 -07:00
Alejandro Alonso
839c49bec3 Microoptimize _lowWord and fix else branch 2024-06-18 15:03:13 -07:00
Kuba (Brecka) Mracek
9e7501601c Merge pull request #74489 from kubamracek/embedded-less-stdlibs
[embedded] Don't build *all* the embedded stdlibs by default
2024-06-18 13:50:25 -07:00
Alejandro Alonso
68952e8281 It is remainder, not remainer 2024-06-18 13:46:57 -07:00
Alejandro Alonso
95ce270a77 Get rid of remaining uses of precondition 2024-06-18 12:45:16 -07:00
Alejandro Alonso
b059766481 Apply @_transparent consistently for (U)Int128 2024-06-18 10:47:48 -07:00
Alejandro Alonso
13bf2ec540 Merge pull request #74507 from Azoy/128-words-are-ice-cold
[stdlib] Mark UInt128.Words as frozen
2024-06-18 08:24:26 -07:00
Kuba (Brecka) Mracek
be841a566a Merge pull request #74493 from kubamracek/cmake-flag-for-volatile
Add a build-script + CMake flag to enable/disable building the _Volatile module
2024-06-18 07:57:05 -07:00
Karoy Lorentey
cd7e4c3db5 Merge pull request #74486 from lorentey/more-9999s
[stdlib] _Builtin_float: More availability adjustments
2024-06-17 22:22:49 -07:00
Alejandro Alonso
95195c60af Mark UInt128.Words as frozen 2024-06-17 17:40:30 -07:00
Karoy Lorentey
9d947e4de0 [stdlib] Add missing overload of extracting for UnboundedRange
I keep forgetting that `some RangeExpression<Element>` does not cover the `UnboundedRange` form.
2024-06-17 15:03:12 -07:00
Slava Pestov
8582828e7a Merge pull request #74445 from slavapestov/fix-failure-type-witness
Concurrency: Fix default type witness for AsyncSequence.Failure
2024-06-17 17:09:06 -04:00
Kuba Mracek
37ed08dc7b Add a build-script + CMake flag to enable/disable building the _Volatile module 2024-06-17 13:18:55 -07:00
Kuba (Brecka) Mracek
03b0f0cc57 Merge pull request #74442 from kubamracek/embedded-string-to-pointer
[embedded] Implement missing _convertConstStringToUTF8PointerArgument to support string to pointer conversion
2024-06-17 10:45:39 -07:00
Kuba Mracek
dc2edb6e9b [embedded] Don't build *all* the embedded stdlibs by default 2024-06-17 10:32:56 -07:00
Karoy Lorentey
5bd05df632 [stdlib] _Builtin_float: More availability adjustments
- Fix one placeholder availability I missed in the previous patch
- Add `visionOS 1.0` availability to work around over-pedantic `@_originallyDefinedIn` diagnostic that started appearing in toolchain builds.
2024-06-17 10:03:28 -07:00
Konrad `ktoso` Malawski
8a2e755b9a GlobalActor documentation typos fixup (#74467)
Co-authored-by: Holly Borla <hborla@apple.com>
2024-06-16 22:28:54 -07:00
Slava Pestov
61d00cacd6 Concurrency: Fix default type witness for AsyncSequence.Failure
Setting this to Self.AsyncIterator.Failure doesn't work because
we replace it with its reduced type Self.Failure, and then if
you run a binary compiled against an older version of the stdlib
that does not declare the Failure associated type, we hit
infinite recursion while instantiating the witness table and
trying to populate the default type witness.

Instead, let's set the default to `any Error`. Associated type
inference is already smart enough to infer the type witness from
the AsyncIterator's Failure type; we don't need to rely on the
default mechanism for that.

Fixes rdar://129605725.
2024-06-14 22:43:49 -04:00
Tim Kientzle
05c74e0d90 Revert "Merge pull request #74394 from tbkka/tbkka-remotemirror-no-more-mpe-metadata-partial"
This reverts commit a1708ef8b1, reversing
changes made to b5930625be.
2024-06-14 15:32:39 -07:00
Kuba Mracek
92a39fce2f [embedded] Implement missing _convertConstStringToUTF8PointerArgument to support string to pointer conversion 2024-06-14 15:32:25 -07:00
Tim Kientzle
80e860881f Fix an ABI break
PR #74394 removed a field from `struct MetadataSections` whose layout is ABI.
So restore that field as an unused padding field to preserve the layout of all
the other fields in that struct.
2024-06-14 13:19:10 -07:00
Konrad `ktoso` Malawski
2ec717b115 [Concurrency] TaskExecutor ownership fixes (#74000) 2024-06-14 22:56:33 +09:00
Konrad `ktoso` Malawski
9659601ecb Merge pull request #74324 from ktoso/wip-whenLocal-inlinable 2024-06-14 18:41:15 +09:00
Karoy Lorentey
2f2786579e Merge pull request #74366 from lorentey/define-availability-for-6.0
Define availability for the 6.0 stdlib & runtime; define placeholder availability for 6.1
2024-06-14 00:51:43 -07:00
Konrad `ktoso` Malawski
0cf67e4cdf Merge pull request #74319 from ktoso/wip-global-custom-exec-docs 2024-06-14 14:48:36 +09:00
Karoy Lorentey
5e95c6e3c5 [stdlib] Define _StdlibVersion.v6_1_0 and set it as the current version 2024-06-13 18:00:45 -07:00
Tim Kientzle
a1708ef8b1 Merge pull request #74394 from tbkka/tbkka-remotemirror-no-more-mpe-metadata-partial
Remove RemoteInspection code to fetch no-longer-used reflection metadata
2024-06-13 16:40:04 -07:00
Karoy Lorentey
d4564e4328 [stdlib] Define availability for SwiftStdlib 6.0 2024-06-13 16:35:42 -07:00
Doug Gregor
8be6286332 Merge pull request #74368 from DougGregor/task-group-iterator-next-isolation
Add a proper `TaskGroup.Iterator.next(isolation:)`
2024-06-13 16:16:24 -07:00
Tim Kientzle
c20ef6de2a Remove RemoteInspection code to fetch no-longer-used reflection metadata
without relying on spare bit information in the reflection metadata
(which was added in #40906).  As a result, we can remove the
code from #40906.

This is the first step in such removal.  It removes the RemoteMirror
code for looking up such metadata.  It leaves behind:

* Sufficient stubs for LLDB to continue to build.  Once LLDB is updated, these stubs can be removed as well.

* The compiler code to emit such metadata.  This allows new binaries to still reflect MPEs on older runtimes.  This will need to be kept for a transitional period.
2024-06-13 09:34:43 -07:00
Alejandro Alonso
79f111a827 Merge pull request #74381 from Azoy/synchronization-build-stuff
[stdlib] Adjust Synchronization module dependencies for macCatalyst
2024-06-13 08:57:42 -07:00
Alex Lorenz
a49eb8eba6 Merge pull request #74348 from hyp/eng/android-stdatomiccxx23
[android] do not import stdatomic from android's libc++
2024-06-13 08:40:01 -07:00
Alejandro Alonso
49e8a73027 Adjust Synchronization module dependencies for macCatalyst 2024-06-12 23:55:51 -07:00
eeckstein
6debc33128 Merge pull request #74332 from eeckstein/swift_dynamiccastclass
embedded: add swift_dynamicCastClass runtime function
2024-06-13 07:31:44 +02:00
Kavon Farvardin
9eba052ab2 Merge pull request #74322 from kavon/se427-noimplicit-for-invertible
SE-427: Make conditional conformances to Copyable more explicit.
2024-06-12 22:03:49 -07:00
Doug Gregor
c5a77fcce5 Add a proper TaskGroup.Iterator.next(isolation:)
Implement this function to pass the isolation through to the task group's
`next(isolation:)`. Fixes rdar://129690995.
2024-06-12 15:57:40 -07:00
Kavon Farvardin
ec4a125f3e NCGenerics: ext's might not infer invertible req's
If the extension adds conformance to an invertible protocol, it's
confusing for people to also infer conditional requirements on the
generic parameters for those invertible protocols. This came up in the
review of SE-427.
2024-06-12 14:44:22 -07:00
Mike Ash
1eed24a9ab Merge pull request #74267 from mikeash/invertible-protocol-checking-key-args-index
[Runtime] Fix key argument indexing when checking invertible protocols.
2024-06-12 15:39:11 -04:00
Alex Lorenz
98b74d8010 [android] do not import stdatomic from android's libc++
android's libc++ uses an older module map that requires C++23 for stdatomic, and thus it fails to compile with anything else
2024-06-12 10:04:14 -07:00
Erik Eckstein
13ecb51612 embedded: add swift_dynamicCastClass runtime function
To enable dynamic class casts

rdar://129672994
2024-06-12 18:23:38 +02:00
Konrad `ktoso` Malawski
8a88569c6b [Distributed] remoteCallVoid is a new requirement in Swift 6.0
And it is handled compatibly because all existing implementations must
have already implemented it before -- it was an ad-hoc requirement
before Swift 6.0, and now it has become a real requirement - the same as
all the other ad-hoc requirements relying on the Serialization
Requirement
2024-06-12 16:32:30 +09:00
Konrad `ktoso` Malawski
3b95855a28 [Distributed] Reword docs since we no longer have ad-hoc requirements 2024-06-12 16:32:30 +09:00
Konrad `ktoso` Malawski
b5dc34984d [Distributed] Typed throws for whenLocal: func must be @_AEIC 2024-06-12 16:32:27 +09:00
Konrad `ktoso` Malawski
fe66c47b8a [docs] Provide more documentation on custom executors with global actors
It could be confusing to adopters who were led to believe by the types
that they should "just" implement the sharedUnownedExecutor property,
but insead they have to implement the unownedExecutor on the specific
actor type.

Adding documentation clarify this as well as a simple test that
exercises this explicitly; We seem to have much coverage of main actor,
but not so much of custom executor global actors.
2024-06-12 12:28:55 +09:00
Kuba (Brecka) Mracek
f97134ca98 Merge pull request #73873 from kubamracek/embedded-mirror-unavailable
[embedded] Make Mirror present but unavailable
2024-06-11 14:37:18 -07:00
Mike Ash
b86fe88c43 [Runtime] Fix key argument indexing when checking invertible protocols.
Track the key argument index separately from the generic parameter index when performing the invertible protocol checking in _checkGenericRequirements. This keeps the indexing correct when a non-key argument is followed by a key argument.

rdar://128774651
2024-06-11 12:39:23 -04:00
Konrad `ktoso` Malawski
bfbceb81c6 Merge pull request #74246 from ktoso/wip-docs 2024-06-11 10:34:17 +09:00