Commit Graph

14 Commits

Author SHA1 Message Date
Mike Ash
185b739cf1 [Runtime] Add function_cast, switch from std::bit_cast.
Function types aren't always trivially copyable, e.g. with address-discriminated signed pointers on ARM64e. Introduce a function_cast helper and use that instead.
2025-04-10 20:29:02 -04:00
Konrad `ktoso` Malawski
240a43b054 Revert "Concurrency: remove workaround for silencing UB" 2025-04-01 07:09:57 +09: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
Konrad `ktoso` Malawski
a92f37998e [freestanding] prefer strncpy with known length (#80005) 2025-03-14 04:44:09 -07:00
Konrad `ktoso` Malawski
fda7f539fb Reapply "Task names" (#79562) (#79600) 2025-03-08 10:58:49 +09: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
Daniel Rodríguez Troitiño
ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
2024-11-02 11:46:46 -07:00
Kuba Mracek
a826d5a088 [Concurrency] Add a no_asserts version of the Embedded Concurrency dependency checking 2024-10-15 08:58:48 -07:00
Kuba Mracek
d2dac4ed72 [Concurrency] Avoid relying on stderr, fprintf(), write() in Embedded Concurrency runtime 2024-10-14 13:36:14 -07:00
Alastair Houghton
54a495527e [Concurrency] Remove C++ runtime references from embedded Concurrency.
In embedded mode, we mustn't have references to the C++ library, because
some embedded platforms don't include the C++ library.

Additionally, it's good to avoid use of global operator new and operator
delete, because they can be globally overridden and this has bitten us
in the past.

rdar://137286187
2024-10-07 10:30:27 +01:00
Kuba Mracek
246477ae2d [embedded] Avoid CHECK-NEXT in dependencies-concurrency-custom-executor.swift due to logging from custom executor 2024-10-02 13:07:41 -07:00
Kuba Mracek
47b6c657b3 [embedded] Update expected symbol dependencies in test/embedded/dependencies-concurrency-custom-executor.swift 2024-10-02 09:22:36 -07:00
Kuba Mracek
ed441eb1bf [Concurrency] Include more pieces of Concurrency in Embedded (AsyncStream, continuations)
We have been only including a subset of files and functionality on Embedded Concurrency, let's instead include all the
source files, and have a fine grained opt out on things that don't yet work. Namely, this is still avoiding clocks, task
sleeping and custom executors.

Add a test for AsyncStream and continuations on Embedded Concurrency.
2024-10-02 09:22:36 -07:00