Commit Graph

21434 Commits

Author SHA1 Message Date
Konrad `ktoso` Malawski
a664c02f60 Merge pull request #73934 from ktoso/pick-concurrency-isCurrent-more-fixes 2024-05-29 10:07:53 +09:00
Mike Ash
c396f75792 [Concurrency] Reference dispatch_async_swift_job directly when the header is available.
Only use dlsym when we don't have the header, since it's an unnecessary performance hit.

rdar://118465481
2024-05-28 17:35:39 -04:00
Eric Miotto
07edd9c766 Merge pull request #73939 from edymtt/edymtt/target-sdks-can-be-empy
CMake: do not assume target SDKs are provided when evaluting `NOT`...
2024-05-28 14:26:39 -07:00
Alex Lorenz
664f332994 Android: do not re-export macros from linux/stat.h from other modules
This lets us declare constants in the Android platform module using the expected mode_t type
2024-05-28 13:08:39 -07:00
Alex Lorenz
607766299b drop android stuff 2024-05-28 13:02:16 -07:00
Alex Lorenz
d7de7c69ca Fix canImport android 2024-05-28 13:01:34 -07:00
Alex Lorenz
57b89d5303 [android] add an android NDK Swift overlay module, and use it instead of Glibc 2024-05-28 12:57:38 -07:00
Alex Lorenz
95493f673d [android] add a module map for Android NDK
This commit doesn't install them yet, they will be installed and a whole Android NDK module will be built in a follow-up commit

This module map covers the Bionic C standard library and other Posix headers used in the Android NDK
2024-05-28 12:55:02 -07:00
Guillaume Lessard
4fc82f895a [stdlib] remove deprecations added by SE-0426 2024-05-28 11:05:31 -07:00
Guillaume Lessard
511e619268 Merge pull request #73900 from glessard/rdar128543858
[stdlib] add failure explanations to debug preconditions
2024-05-28 09:21:28 -07:00
Alex Lorenz
444e2f465b Android: do not re-export macros from linux/stat.h from other modules
This lets us declare constants in the Android platform module using the expected mode_t type
2024-05-28 08:58:23 -07:00
Eric Miotto
99a4a0d203 CMake: do not assume target SDKs are provided when evaluting NOT...
... operator in `add_swift_target_library` and
`add_swift_target_executable`

This can be the case when building the stdlib for embedded on its own
(i.e. without the compiler or other platforms).

Addresses rdar://128819523
2024-05-28 07:41:08 -07:00
Konrad `ktoso` Malawski
7c0e1f599a [Concurrency] Fix embedded, cannot refer to runtime/env vars from Actor.cpp 2024-05-28 18:19:55 +09:00
Konrad `ktoso` Malawski
e9b25d1091 [Concurrency] Move innermost record assertion to handle more gracefully 2024-05-28 16:58:38 +09:00
Konrad `ktoso` Malawski
7eef019dcd Merge pull request #73813 from ktoso/pick-concurrency-isCurrent-more-fixes 2024-05-28 15:52:43 +09:00
Kuba Mracek
5ec41ad232 [embedded] Use -ffreestanding when building Unicode data tables library even on Linux 2024-05-27 13:07:28 -07:00
Konrad `ktoso` Malawski
153806b71a [Concurrency] Reshape initial values of executor checking so tests pass on Linux 2024-05-27 17:02:26 +09:00
Konrad `ktoso` Malawski
d36f99540c [Concurrency] Always assume that if expecting main actor and are on main thread that this is equal 2024-05-27 17:02:26 +09:00
Konrad `ktoso` Malawski
7790609fc8 [Concurrency] Futher prevent crashes in legacy mode of isCurrentExecutor 2024-05-27 17:02:26 +09:00
Konrad `ktoso` Malawski
481c928d67 [Concurrency] Fix missing return in legacy isSameExecutor mode detection
resolves rdar://128425368
resolves rdar://127400013
2024-05-27 17:02:25 +09:00
Alex Lorenz
dac073965b [android] add a module map for Android NDK
This commit doesn't install them yet, they will be installed and a whole Android NDK module will be built in a follow-up commit

This module map covers the Bionic C standard library and other Posix headers used in the Android NDK
2024-05-26 20:00:10 -07:00
Kuba Mracek
78d19ff6ba [embedded] Explicitly install libswiftUnicodeDataTables.a with -x permissions 2024-05-26 13:00:53 -07:00
Kuba Mracek
7d92baaddd [embedded] Provide Unicode data tables for embedded as a static library 2024-05-26 13:00:52 -07:00
Kuba (Brecka) Mracek
545c2434c0 Merge pull request #70446 from kubamracek/embedded-string
[embedded] Port Swift.String to embedded Swift
2024-05-26 12:59:01 -07:00
nate-chandler
c0af25c069 Merge pull request #73890 from nate-chandler/rdar128661878
[BitwiseCopyable] Drop req from SIMD/Storage.
2024-05-24 18:10:57 -07:00
Guillaume Lessard
71258c4a2a [stdlib] add failure explanations to debug preconditions
addresses rdar://128543858
2024-05-24 14:02:57 -07:00
Holly Borla
1011e4ddb0 [Concurrency] Only deprecate AnyActor, and update more tests.
Obsoleting `AnyActor` in Swift 6 blocks the Concurrency library itself
from migrating to Swift 6, because `Actor` and `DistributedActor` have to
preserve their refinement of `AnyActor` to avoid breaking code currently
using the marker protocol. There's no way to move protocol refinement into
an extension so that the use-site declaration can be obsoleted, so we're
stuck with just the deprecation of `AnyActor`.
2024-05-24 12:58:02 -07:00
Nate Chandler
746cf2ff5b [BitwiseCopyable] Drop req from SIMD/Storage.
There are conformers to SIMDStorage (like that in the added test case)
which involve an Array (a type that can't conform to BitwiseCopyable).
So lift the constraint on SIMDStorage.  This in turn requires lifting
the constraint on SIMD (otherwise, e.g. `SIMD8<Scalar>` would fail to
conform since it has as a member some SIMD8Storage which is only
constrained to conform to `SIMDStorage`; the `SIMD8Storage`
associatedtype also cannot be constrained to `BitwiseCopyable` because
that storage may again not conform as in the test example).

rdar://128661878
2024-05-24 12:32:10 -07:00
Holly Borla
2590b2d7ac [Concurrency] Obsolete a few deprecated typealiases to Sendable in
Swift 6.
2024-05-24 08:58:41 -07:00
Holly Borla
7af38860ed [Concurrency] Deprecate and obsolete AnyActor.
This marker protocol isn't useful for abstracting over actors and distributed
actors because it doesn't have any runtime requirements, so there's no way
to switch to the given actor. Instead, you should use `isolated (any Actor)?`
parameters, and the compiler will compute a local actor value from a
distributed actor using `DistributedActor.asLocalActor`.
2024-05-24 08:57:17 -07:00
Saleem Abdulrasool
1f70b2fdff Merge pull request #73825 from compnerd/atomic
Platform: add new module for VC 17.10.0
2024-05-24 00:00:47 +09:00
Alex Martini
65a5216a7b Merge pull request #73238 from amartini51/copyable_126377559
Add reference for Copyable

Fixes: rdar://126377559
2024-05-22 15:55:47 -07:00
Mike Ash
634295c85e Merge pull request #73796 from mikeash/fix-resume-function-for-logging
[Concurrency] Refine getResumeFunctionForLogging to avoid reading invalid future contexts.
2024-05-22 16:57:37 -04:00
Saleem Abdulrasool
b68188b00c Platform: add new module for VC 17.10.0
The new headers for LWG-3268 in the new VC release broke the
modularisation of `std.atomic`. Add the dependent private module to
ensure that we correctly modularise the dependency and allow
`std.atomic` to be built again.
2024-05-22 13:10:08 -07:00
Augusto Noronha
dd39730d74 Merge pull request #73723 from augusto2112/default-actor-ti-main
[RemoteInspection] Hardcode DefaultActorStorage's type info
2024-05-22 11:14:47 -07:00
eeckstein
7c69bec9b4 Merge pull request #73782 from eeckstein/static-arrays-in-embedded
IRGen: support read-only statically initialized arrays in embedded swift
2024-05-22 19:34:42 +02:00
Alejandro Alonso
4221d9f76a Merge pull request #73734 from Azoy/bitwisecopyable-atomic-reps
[stdlib] Enforce that atomic representations are BitwiseCopyable
2024-05-22 08:19:06 -07:00
Mike Ash
b67c4bfc22 Merge pull request #73761 from mikeash/lazy-signposts-option
[Runtime] Use CMake variable to control os_trace_lazy_init usage.
2024-05-22 11:01:35 -04:00
Andrew Trick
6339b2236e Merge pull request #73808 from apple/revert-70910-mpokhylets/fix-list-merger-performance
Revert "Fix quadratic performance of the `ListMerger` in specific usage pattern"
2024-05-21 20:35:19 -07:00
Andrew Trick
bdc959fc6f Merge pull request #73786 from mikeash/prespecializations-dyld-hash-table-availability-fix
[Runtime] Add weak check to use of _dyld_find_pointer_hash_table_entry.
2024-05-21 17:28:39 -07:00
Andrew Trick
2640ff613b Revert "Fix quadratic performance of the ListMerger in specific usage pattern" 2024-05-21 16:23:57 -07:00
Mike Ash
0f226b6667 [Concurrency] Refine getResumeFunctionForLogging to avoid reading invalid future contexts.
When using a future adapter, the resume context may not be valid after the task starts running. Only peer through the adapter when we're starting to run.

rdar://126298035
2024-05-21 16:22:40 -04:00
Erik Eckstein
162139364e IRGen: support read-only statically initialized arrays in embedded swift
Arrays buffers need to be initialized with a (minimal) metatype and with an immortal reference count.
2024-05-21 18:04:10 +02:00
Mike Ash
ae71658c6a [Runtime] Add weak check to use of _dyld_find_pointer_hash_table_entry.
Needed to avoid availability errors in some configurations.

rdar://127621414
2024-05-21 10:59:15 -04:00
Alastair Houghton
ee630d407f [Build] Don't include Compatiblity50/51 for 64-bit watchOS.
We don't support Swift 5.0 or 5.1 on ARM64 watchOS.

rdar://128445543
2024-05-21 14:21:48 +01:00
Mike Ash
7f2d4be642 [Runtime] Use CMake variable to control os_trace_lazy_init usage.
SWIFT_BNI_OS_BUILD isn't exactly what we need. Use an option to turn it on/off instead.

rdar://128408295
2024-05-20 17:39:01 -04:00
John McCall
e1a82f622e Merge pull request #70910 from nickolas-pohilets/mpokhylets/fix-list-merger-performance
Fix quadratic performance of the `ListMerger` in specific usage pattern
2024-05-20 17:26:34 -04:00
David Smith
b81aec5c1a rdar://127199021, fix compatibility with apps that accidentally do [[[aSwiftArray class] new] mutableCopy] to work (#73728) 2024-05-20 12:06:05 -07:00
Alastair Houghton
72d801c88e Merge pull request #73747 from al45tair/eng/PR-128388845
[Shims] Fix nullability for musl.
2024-05-20 15:30:02 +01:00
Alastair Houghton
5e24abc970 [Shims] Fix nullability for musl.
Apparently I got the merge for this slightly wrong.

rdar://128388845
2024-05-20 12:18:59 +01:00