Commit Graph

519 Commits

Author SHA1 Message Date
Artem Chikin
69b4ea3469 Merge pull request #80421 from swiftlang/revert-80246-playing-with-pointy-pointers
Revert "Concurrency: remove workaround for silencing UB"
2025-04-03 16:12:53 -07:00
Kuba (Brecka) Mracek
eb1c92575d Merge pull request #80416 from kubamracek/embedded-mergeable-global-refs
[embedded] Fix compilation crash with -num-threads and -mergeable-symbols
2025-04-03 08:49:26 -07:00
Alastair Houghton
963edb794e Merge pull request #80410 from al45tair/eng/PR-148254407
[Tests][Embedded] Update dependencies for embedded concurrency slightly.
2025-04-01 16:27:52 +01:00
Kuba Mracek
c9ea28c3c7 [embedded] Make linux-rng-support.c friendly to compiling in both C and C++ mode 2025-04-01 06:32:18 -07:00
Konrad `ktoso` Malawski
240a43b054 Revert "Concurrency: remove workaround for silencing UB" 2025-04-01 07:09:57 +09:00
Kuba Mracek
6d71f45101 [embedded] Stop using -D__APPLE__ and -D__MACH__ 2025-03-31 15:07:11 -07:00
Kuba Mracek
461a25ce46 [embedded] Add %linux_rng_support_c_if_needed lit substitution 2025-03-31 14:35:30 -07:00
Kuba Mracek
e80cc2fb34 [embedded] Fix compilation crash with -num-threads and -mergeable-symbols 2025-03-31 11:23:50 -07:00
Alastair Houghton
903472d2bc [Tests][Embedded] Update dependencies for embedded concurrency slightly.
We should allow `_memcpy`.

rdar://148254407
2025-03-31 17:34:49 +01:00
Saleem Abdulrasool
50e4cc78f6 Merge pull request #80246 from compnerd/playing-with-pointy-pointers
Concurrency: remove workaround for silencing UB
2025-03-28 18:34:27 -07:00
Mike Ash
ecdcb82b97 Merge pull request #80316 from mikeash/lock-record-begone
[Concurrency] Eliminate StatusRecordLockRecord.
2025-03-28 17:18:40 -04:00
Mike Ash
45727aff76 Fix concurrency-leaks.swift test to account for no more status lock record. 2025-03-28 09:59:33 -04:00
Saleem Abdulrasool
87f2b88ada Concurrency: remove workaround for silencing UB
The newer clang properly identifies UB on invalid pointer casts. This
was previously being silenced by suppressing the warnings. Adjust the
code to use `std::bit_cast` (or the shim implementation) to avoid the
UB in this code.
2025-03-27 08:27:06 -07:00
Kuba Mracek
a1cbb85b56 Fix REQUIRES lines in test/embedded/traps-mergeable.swift, include experimental features 2025-03-24 09:04:11 -07:00
Kuba Mracek
0318d2ba45 Adjust test/embedded/traps-mergeable.swift for $e mangling in Embedded Swift 2025-03-24 09:04:11 -07:00
Kuba Mracek
164b61c83d Add -Xfrontend -mergeable-traps as a way to emit mergeable traps 2025-03-24 09:04:11 -07:00
Kuba (Brecka) Mracek
033f6679e8 Merge pull request #80185 from kubamracek/embedded/used
[embedded] Link in @_used declarations from other modules in SILLinker
2025-03-22 12:01:56 -07:00
Kuba Mracek
9a293ed29a [embedded] Link in @_used declarations from other modules in SILLinker 2025-03-20 15:52:15 -07:00
Kuba (Brecka) Mracek
605f1c94cf Merge pull request #79892 from kubamracek/embedded/mergeable-weakodr
[embedded] Emit weak_odr instead of linkonce_odr symbols under -Xfrontend -mergeable-symbols
2025-03-20 10:27:13 -07:00
Kuba Mracek
7c9bc7c362 [embedded] Tweak REQUIRES clauses in linkage tests 2025-03-19 13:36:51 -07:00
Kuba Mracek
e860bbb12d [embedded][Concurrency] Add a test for a 'async throws(T)' typed throws async function 2025-03-19 11:17:29 -07:00
Konrad `ktoso` Malawski
a92f37998e [freestanding] prefer strncpy with known length (#80005) 2025-03-14 04:44:09 -07:00
Kuba Mracek
1931ef175d Add test/embedded/linkage-mergeable-dead-strip.swift test 2025-03-11 10:48:55 -07:00
Erik Eckstein
23b4c6fc34 embedded: fix specialization of associated conformance entries in witness tables
When creating a specialized witness table, we need to get the right specialized conformance.
In IRGen don't emit associated conformance witness table entries if the protocol is not a class protocol.
In this case the associated type can never be used to create an existential. Therefore such a witness table entry is never used at runtime in embedded swift.

Fixes a compiler crash

rdar://146448091
2025-03-11 11:33:10 +01:00
Konrad `ktoso` Malawski
e056c63c89 [Concurrency] Implement isIsolatingCurrentContext requirement and mode (#79788) 2025-03-11 09:48:38 +09:00
Kuba Mracek
d25f1fa86f [embedded] Emit weak_odr instead of linkonce_odr symbols under -Xfrontend -mergeable-symbols 2025-03-10 15:01:23 -07:00
Kuba (Brecka) Mracek
43919e8b8a Merge pull request #79706 from kubamracek/embedded-concurrency-deleted-method
[embedded][Concurrency] Fix missing swift_deletedAsyncMethodError
2025-03-10 12:27:00 -07:00
Konrad `ktoso` Malawski
fda7f539fb Reapply "Task names" (#79562) (#79600) 2025-03-08 10:58:49 +09:00
Kuba Mracek
71a5e397e4 [embedded][Concurrency] Fix missing swift_deletedAsyncMethodError 2025-03-01 06:48:39 -08:00
Kuba Mracek
40aea83c6b [embedded] Allow string-interpolatings in assert, assertionFailure, precondition, preconditionFailure 2025-02-28 18:47:47 -08:00
Kuba Mracek
01d7e231c3 [embedded] Allow string-interpolating fatalError in Embedded Swift 2025-02-28 08:53:09 -08:00
Konrad `ktoso` Malawski
09003d6f11 Revert "Merge pull request #77609 from ktoso/wip-task-names" (#79562)
This reverts commit 4ab5d2604f.
2025-02-23 22:59:21 -08:00
Konrad `ktoso` Malawski
4ab5d2604f Merge pull request #77609 from ktoso/wip-task-names
[Concurrency] Task names
2025-02-21 22:28:33 +09:00
Doug Gregor
3c8ef82963 Enable usable of Span by default
Usage of Span was temporarily behind an experimental feature flag. Now
that SE-0447 has been accepted, remove the experimental feature flag and
allow Span usage everywhere.

Implements rdar://144819992.
2025-02-14 10:45:47 -08:00
Erik Eckstein
5b93eb31bf Optimizer: remove the AllocVectorLowering pass
It's not needed anymore, because the "FixedArray" experimental feature is replaced by inline-arrays.
2025-02-12 10:51:14 +01:00
Kuba (Brecka) Mracek
63b2f58d9e Merge pull request #79242 from kubamracek/embedded-mergeable-symbols
[embedded] Add an experimental -Xfrontend -mergeable-symbols to allow linking multiple .o modules in Embedded Swift
2025-02-10 15:17:05 -08:00
Allan Shortlidge
022596473f Merge pull request #79248 from tshortli/abi-compatible-platform-decl-reachability
AST: Platform-specific fixes for `-unavailable-decl-optimization`
2025-02-09 16:53:59 -08:00
Kuba (Brecka) Mracek
31af4d9ed5 Merge pull request #79243 from kubamracek/embedded-currenttask
[embedded] Add a test for withUnsafeCurrentTask
2025-02-09 16:04:20 -08:00
Allan Shortlidge
b9e1cbd3ac AST: Enable -unavailable-decl-optimization on visionOS.
Using availability domains, reimplement the algorithm that determines whether a
declaration is unavailable at runtime. The new algorithm takes ABI compatible
platforms into account, ensuring that declarations that are available on iOS do
not get treated as unreachable at runtime when compiling for visionOS.

Resolves rdar://116742214.
2025-02-09 11:19:08 -08:00
Allan Shortlidge
e47638940e AST: Introduce swift::getAvailabilityConstraintsForDecl().
This new query is designed to become the canonical source of information
regarding whether a declaration is available to use in a given
`AvailabilityContext`. It should be adopted as the foundational building block
for all other queries that answer more specific questions about the
availability of a specific delcaration.

The implementation of this query has been copied from a variety of sources
which should eventually be deleted once the new query has been fully adopted.

NFC.
2025-02-08 22:47:01 -08:00
Kuba Mracek
0d814ceb81 [embedded] Add a test for withUnsafeCurrentTask 2025-02-08 13:36:26 -08:00
Kuba Mracek
b2f87e7614 [embedded] Add an experimental -Xfrontend -mergeable-symbols to allow linking multiple .o modules in Embedded Swift 2025-02-08 11:56:09 -08:00
Kuba (Brecka) Mracek
96862b4bb0 Merge pull request #79082 from swiftlang/revert-78986-embedded-api-descriptor
Revert "[embedded] Don't emit extensions to API descriptor under Embedded Swift, avoid compiler crash"
2025-01-31 16:59:23 -08:00
Kuba (Brecka) Mracek
3afe8ebdf6 Merge pull request #78919 from kubamracek/embedded-dict-init
[embedded] Support Dictionary.init(uniqueKeysWithValues:) in Embedded Swift
2025-01-31 11:03:04 -08:00
Kuba (Brecka) Mracek
7d257c9a05 Revert "[embedded] Don't emit extensions to API descriptor under Embedded Swift, avoid compiler crash" 2025-01-31 11:01:52 -08:00
Kuba (Brecka) Mracek
fd9777e500 Merge pull request #78986 from kubamracek/embedded-api-descriptor
[embedded] Don't emit extensions to API descriptor under Embedded Swift, avoid compiler crash
2025-01-31 11:01:45 -08:00
Kuba Mracek
6d31a8b7b0 [embedded] Restrict test/embedded/dict-init.swift to macOS only 2025-01-30 09:16:39 -08:00
Kuba (Brecka) Mracek
7c685ba36b Merge pull request #78915 from kubamracek/embedded-string-switch-with-cache
[embedded] Support _findStringSwitchCaseWithCache in Embedded Swift
2025-01-28 15:56:22 -08:00
Kuba Mracek
fcc851b5c8 [embedded] Adjust test/embedded/api-descriptor-crash.swift for Linux mangling 2025-01-28 13:42:18 -08:00
Kuba (Brecka) Mracek
53921e4c8c Merge pull request #78920 from kubamracek/embedded-wae
[embedded] Support withoutActuallyEscaping in Embedded Swift
2025-01-28 12:32:48 -08:00