Konrad 'ktoso' Malawski
6872707574
[embedded][Concurrency] Further refine C-api boundary for isIsolating...
2025-04-29 22:29:26 +09:00
Konrad 'ktoso' Malawski
e1dc854f8f
[Concurrency] Change isIsolatingCurrent... to return Bool?
...
This changes the isIsolatingCurrentContext function to return `Bool?`
and removes all the witness table trickery we did previously to detect
if it was implemented or not. This comes at a cost of trying to invoke
it always, before `checkIsolated`, but it makes for an simpler
implementation and more checkable even by third party Swift code which
may want to ask this question.
Along with the `withSerialExecutor` function, this now enables us to
check the isolation at runtime when we have an `any Actor` e.g. from
`#isolation`.
Updates SE-0471 according to
https://forums.swift.org/t/se-0471-improved-custom-serialexecutor-isolation-checking-for-concurrency-runtime/78834/
review discussions
2025-04-29 20:08:55 +09:00
Kuba Mracek
dcb2636aa1
[embedded] Fix linux-rng-support.c compiling in C++ mode, make it C instead
2025-04-07 16:46:27 -07: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
e056c63c89
[Concurrency] Implement isIsolatingCurrentContext requirement and mode ( #79788 )
2025-03-11 09:48:38 +09: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 Mracek
b197db88b0
[ConstExpr] Relax expectations in ArrayAppendElement to allow direct-passed element
2024-11-08 14:37:15 -08:00
Kuba Mracek
db94dc7d36
[Concurrency] Fix memory leak around mismatched refcounting in Concurrency
2024-10-31 21:43:02 -07:00
Kuba Mracek
84b69f0c56
[GenericCloner] Propagate @_optimize(none) when cloning
2024-10-21 16:47:19 -07:00
Kuba Mracek
8666aef39f
[embedded] Fix a memory leak caused by incorrect refcounting logic around doNotFreeBit
2024-10-18 23:19:40 -07:00
Alastair Houghton
31df4edb7c
[Concurrency] Add a test for the new custom executor feature.
...
Added an executor implementation and a test that tries to use it.
Also fix up a few issues in `ExecutorImpl.h`.
rdar://135380149
2024-09-30 17:15:40 +01:00
Kuba Mracek
8b2253446f
[embedded] Add executable tests for fatalError, precondition, preconditionFailure in embedded Swift
2024-04-09 11:36:38 -07:00
Kuba Mracek
3cf84bec87
[embedded] Add an arc4random_buf stub for Linux for embedded/dependencies-random.swift test
2024-01-17 14:53:24 -08:00
Kuba Mracek
75f0e3c66a
[embedded] Add a stop-gap print() for embedded Swift
2024-01-13 21:35:36 +01:00
Erik Eckstein
ae278058e6
Add an experimental pass to lower allocateVector builtins
...
By default it lowers the builtin to an `alloc_vector` with a paired `dealloc_stack`.
If the builtin appears in the initializer of a global variable and the vector elements are initialized,
a statically initialized global is created where the initializer is a `vector` instruction.
2023-12-09 18:49:58 +01:00
Kuba Mracek
624df4d71b
[embedded] Make ExpressibleByStringInterpolation available in embedded Swift
2023-10-14 23:10:55 -07:00
Kuba Mracek
86ad378928
[embedded] Add a simple Swift runtime, written in embedded Swift
2023-09-25 19:51:19 -07:00
Kuba Mracek
e82929f65b
[embedded] Add a test showcasing a small runtime handling refcounting and class allocations written in embedded Swift
2023-09-25 13:27:34 -07:00
Kuba Mracek
1f7f5bbc75
[embedded] Add executable tests for array builtins
2023-09-24 21:40:18 -07:00
Kuba Mracek
d2b8d62b8d
[embedded] Add test showcasing class and subclass deinit calls
2023-09-23 14:57:16 -07:00
Kuba Mracek
06b62682f4
[embedded] Implement more refcounting in the arrays test
2023-09-20 09:58:26 -07:00
Kuba Mracek
0b71280204
[embedded] Move dummy test runtime into a separate .c file
2023-09-20 09:41:09 -07:00
Kuba Mracek
b74da6b28a
[embedded] Move int printing to C (to workaround lack of CVaListPointer)
2023-09-19 15:53:18 -07:00