Commit Graph

19 Commits

Author SHA1 Message Date
Allan Shortlidge
c02fc4724d Tests: Remove -disable-availability-checking from many Concurrency tests.
Instead, use the `%target-swift-5.1-abi-triple` substitution to compile the tests
for deployment to the minimum OS versions required for use of _Concurrency APIs.
2024-10-18 16:21:51 -07:00
Allan Shortlidge
ac464f3d15 Revert "Disable some Concurrency tests on freestanding"
This reverts commit a8e79e7430.
2024-01-03 13:59:02 -08:00
Meghana Gupta
a8e79e7430 Disable some Concurrency tests on freestanding 2023-11-01 13:13:55 -07:00
Yuta Saito
f6b91c1c37 Concurrency: Enable runtime tests for non-libdispatch global executor 2022-02-20 23:58:14 +00:00
Nate Chandler
ea42e2f334 Enabling copy propagation enables lexical lifetimes.
The effect of passing -enable-copy-propagation is both to enable the
CopyPropagation pass to shorten object lifetimes and also to enable
lexical lifetimes to ensure that object lifetimes aren't shortened while
a variable is still in scope and used.

Add a new flag, -enable-lexical-borrow-scopes=true to override
-enable-copy-propagation's effect (setting it to ::ExperimentalLate) on
SILOptions::LexicalLifetimes that sets it to ::Early even in the face of
-enable-copy-propagation.  The old flag -disable-lexical-lifetimes is
renamed to -enable-lexical-borrow-scopes=false but continues to set that
option to ::Off even when -enable-copy-propagation is passed.
2021-12-08 19:13:21 -08:00
Doug Gregor
3ee09a2298 Switch concurrency runtime tests to "REQUIRES: concurrency_runtime"
Rather than blanket-disabling concurrency tests when we aren't using a
just-built concurrency library, enable them whenever we have a
suitable concurrency runtime, either just-built, in the OS, or via the
back-deployment libraries.
2021-09-13 12:34:20 -07:00
Doug Gregor
eeeea49764 Remove -enable-experimental-concurrency almost everywhere. 2021-07-26 21:24:43 -07:00
Doug Gregor
1e2012d816 Disable availability checking in tests that use concurrency 2021-07-20 12:46:26 -07:00
Kavon Farvardin
05f03b0e79 Fix SILGen of access to isolated static properties
When accessing a static property isolated to a
global-actor, such as MainActor, a `hop_to_executor`
was not being emitted. This was caught by an assertion
I had left to catch such cases, but of course in release
builds this will lead to incorrect SIL, etc.

This issue revealed some other problems with how
the implementation was done for other kinds of
accesses starting from a static property, e.g.,
emitting a redundant hop for the same access.
This was fixed by modelling the actor-isolation
placed into a component as only being accessible
by consuming it from the component. This prevents
the emission of the hops more than once.

Thus, the regression test was updated to catch
unexpected hop_to_executor instructions.

Resolves rdar://78292384
2021-06-30 12:33:40 -07:00
Doug Gregor
4e306bb8ab Revert "[Test] Disable failing concurrency tests on Linux."
This reverts commit 766bf78eea.
2021-04-14 23:33:51 -07:00
Holly Borla
766bf78eea [Test] Disable failing concurrency tests on Linux. 2021-04-14 10:44:46 -07:00
Nate Chandler
ff7c98123a [Test] Disabled several Concurrency tests for back_deployment_runtime.
rdar://76566598
2021-04-13 15:27:41 -07:00
Karoy Lorentey
24aca4072a [test] Skip concurrency tests during back deployment testing
rdar://76038845
2021-03-30 22:35:38 -07:00
Doug Gregor
cfa07b60ee Merge pull request #36477 from jckarter/executor-hop-back
Concurrency: Hop back to the previous executor after actor calls.
2021-03-19 10:17:20 -07:00
Doug Gregor
9579390024 [SE-0304] Rename ConcurrentValue to Sendable 2021-03-18 22:48:20 -07:00
Joe Groff
79fb05b362 Concurrency: Hop back to the previous executor after actor calls.
Tasks shouldn't normally hog the actor context indefinitely after making a call that's bound to
that actor, since that prevents the actor from potentially taking on other jobs it needs to
be able to address. Set up SILGen so that it saves the current executor (using a new runtime
entry point) and hops back to it after every actor call, not only ones where the caller context
is also actor-bound.

The added executor hopping here also exposed a bug in the runtime implementation while processing
DefaultActor jobs, where if an actor job returned to the processing loop having already yielded
the thread back to a generic executor, we would still attempt to make the actor give up the thread
again, corrupting its state.

rdar://71905765
2021-03-18 11:47:50 -07:00
Robert Widmann
023e86bbfb Revert "Disable Test That Trips Coro Split Assert on Linux"
This reverts commit 93569a27f6.
2021-03-05 11:48:29 -08:00
Robert Widmann
93569a27f6 Disable Test That Trips Coro Split Assert on Linux 2021-03-05 11:35:19 -08:00
Kavon Farvardin
de0d99833a added execution test of async actor prop accesses 2021-03-04 18:37:32 -08:00