Commit Graph

16062 Commits

Author SHA1 Message Date
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
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
Erik Eckstein
13ecb51612 embedded: add swift_dynamicCastClass runtime function
To enable dynamic class casts

rdar://129672994
2024-06-12 18:23:38 +02: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
Kuba Mracek
5e1721dd4a [embedded] Make Mirror present but unavailable 2024-06-10 13:40:36 -07:00
Alejandro Alonso
e3a53abe13 Don't use aarch64 hint for arm targets 2024-06-10 09:23:21 -07:00
Konrad `ktoso` Malawski
f245ecf45c [TaskGroup] Fix typo in code snippet 2024-06-10 18:29:38 +09:00
Konrad `ktoso` Malawski
0135623d9a [docs] fix typo in type name in code snippet 2024-06-10 17:21:47 +09:00
Konrad `ktoso` Malawski
d8cba034b3 [docs] remove swift style code highlighting on non-swift snippet 2024-06-10 17:20:57 +09:00
Konrad `ktoso` Malawski
cd0b3f0d4d [docs] Remove line in Task docs that is an error in Swift 6 mode 2024-06-10 17:19:57 +09:00
Alex Lorenz
c8b5344d3e Merge pull request #72014 from compnerd/android
utils: support building android SDKs on Windows
2024-06-07 12:37:00 -07:00
Alejandro Alonso
73b0ad3622 Merge pull request #74122 from Azoy/dict-builder-condition
[stdlib] Guard for empty singleton in dictionary builder
2024-06-06 15:36:31 -07:00
Alejandro Alonso
b1ceb9b947 Update MutexUnavailable.swift (#74182)
Fixes the availability syntax for minimal platforms.
Resolves: rdar://129345303
2024-06-06 12:46:28 -07:00
Alex Lorenz
30dbf3a4aa do not add ObjectIdentifier+DebugDescription.swift for android builds 2024-06-06 11:19:44 -07:00
Alejandro Alonso
4f8181dde6 Merge pull request #74143 from Azoy/mutex-minimal-thing
[stdlib] Condition Mutex.swift on platform
2024-06-06 07:54:36 -07:00
Tim Kientzle
6c2b772b86 Merge pull request #74145 from tbkka/tbkka-remotemirror-mpe-fixes
Expand the work from #73491 to support more MPE layouts.
2024-06-06 07:31:20 -07:00
Yuta Saito
da6f015e3c Merge pull request #74171 from kateinoigakukun/yt/fix-mutex-wasm-test
[Synchronization] Fix wasm atomic intrinsic declarations
2024-06-06 16:58:32 +09:00
Alex Lorenz
bffb878476 Merge pull request #74160 from hyp/eng/fix-android-synchro
[android] Fix Synchronization Android build
2024-06-05 23:38:47 -07:00
Yuta Saito
2dbbbcf646 [Synchronization] Skip atomic operations in single-threaded mode on WebAssembly
Use of atomics instructions requires the support of threads proposal and
it's not widely supported yet. So we should enable actual atomic
operations only when targeting wasm32-uknown-wasip1-threads.
2024-06-06 04:18:13 +00:00
Yuta Saito
0536c9ac65 [Synchronization] Fix wasm atomic intrinsic declarations
Otherwise, isel will not be able to select the desired atomic
instructions.
2024-06-06 04:18:13 +00:00
Michael Gottesman
db66a207e1 Merge pull request #74151 from gottesmm/pr-89c1f2ab73ad928c312b9bdddb9e2c5cb550439c
[concurrency] Update withUnsafe{,Throwing}Continuation to have a sending result.
2024-06-05 20:06:09 -07:00
Alex Lorenz
5aa63fc93e Merge pull request #72634 from hyp/eng/android/ndk-overlay
[android] add an Android NDK Swift overlay
2024-06-05 19:35:13 -07:00
Alex Lorenz
46502f9249 Merge pull request #72161 from hyp/eng/android-ndk-modulemap
[android] add a module map for Android NDK
2024-06-05 19:35:00 -07:00
Alex Lorenz
74d2a66a27 [androd] Fix Synchronization Android build
Add Android import for Mutex implementation
2024-06-05 16:58:05 -07:00
Tim Kientzle
3895908c67 Sanity: Don't spend too much time (or memory) on rediculously large enums
RemoteMirror gets called on lots of malformed type information,
due to memory corruption bugs or even clients that ask RemoteMirror
to decode a chunk of memory to test whether or not it might be
valid type data.  In any case, we need to be a little cautious here.

In this case, I've chosen to ignore any enum whose in-memory size
(according to the metadata) is over 1 MiB.  We can easily adjust
this limit up if experience shows there really are legitimate enums
this large in the wild.
2024-06-05 16:00:05 -07:00
Tim Kientzle
346d5b22c4 Correct handling of nonsensical Int types
If an Int type makes no sense (it has a nonsensical number
of extra inhabitants, for example), ignore it rather than
treating it as a non-Int type.

Rename `isIntType()` to `intTypeBitSize()` to better document
what this function actually returns.
2024-06-05 14:58:46 -07:00
Alejandro Alonso
fcfbf068a5 Add a special file for mutex on unavailable platforms 2024-06-05 13:51:55 -07:00
Michael Gottesman
5db3b70c65 [concurrency] Update withUnsafe{,Throwing}Continuation to have a sending result.
rdar://129299180
2024-06-05 12:50:59 -07:00
Alex Lorenz
743a501d1b comment cleanup 2024-06-05 10:53:15 -07:00
Tim Kientzle
40eb3c084d Expand the work from #73491 to support more MPE layouts. This also switches the
MPE layout code to exclusively use the new code.  The key observation: existing
reflection metadata seems to already provide enough information in all cases, so
we can abandon an earlier effort to add spare bitmask data.

Resolves rdar://129281368
2024-06-05 10:15:58 -07:00
Yuta Saito
3b1791a638 [Synchronization] Fix Wasm mutex build
This change fixes the following build error happening on Wasm:
```
error: referencing instance method '_wait(expected:)' on 'Atomic' requires the types '_MutexHandle.State' and 'UInt32' be equivalent
```
2024-06-05 17:15:43 +00:00
Alejandro Alonso
bc0e6ab392 Conditionalize Mutex.swift 2024-06-05 09:20:59 -07:00
Alejandro Alonso
643c2771e2 Merge pull request #71383 from Azoy/mutex
[stdlib] Implement Mutex in Synchronization
2024-06-04 18:38:50 -07:00
Alex Lorenz
273edcf2a2 build CxxStdlib for Android too 2024-06-04 15:46:39 -07:00
Konrad `ktoso` Malawski
4fc0f3ab61 Merge pull request #73634 from ktoso/wip-document-exexecutors-apidoc 2024-06-05 06:27:46 +09:00
Alejandro Alonso
676b8e7bae Update stdlib/public/core/DictionaryBuilder.swift
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
2024-06-04 20:46:11 +00:00
Alejandro Alonso
551acb3d4b Guard for empty singleton in dictionary builder 2024-06-04 13:30:03 -07:00
Alex Lorenz
e9739d7787 remove additional glibc android check from cmake 2024-06-04 12:37:59 -07:00
Alex Lorenz
9c31f98f6f [cmake] fix android header name targets 2024-06-04 12:37:51 -07:00
Alex Lorenz
8b8c72acd8 [stdlib] add a _math module overlay for Android for deprecated constants 2024-06-04 12:37:43 -07:00
Alejandro Alonso
cb3fc4b451 Adopt sending and movesAsLike 2024-06-04 09:49:21 -07:00
Alejandro Alonso
6b29e779e4 Support visionOS for Mutex 2024-06-04 09:06:37 -07:00
Alejandro Alonso
66ec7abd54 Underscore some things, add explicit internal
Fix some compile issues
2024-06-04 09:06:37 -07:00
Alejandro Alonso
fbfb218d11 Update LinuxImpl.swift 2024-06-04 09:06:37 -07:00
Alejandro Alonso
3a115fc290 Properly handle the syscalls on Linux and do some spins
fix some stuff
2024-06-04 09:06:37 -07:00
Alejandro Alonso
9b389a3df5 Fix tests and toolchain build 2024-06-04 09:06:37 -07:00