Commit Graph

14 Commits

Author SHA1 Message Date
Allan Shortlidge
cb578172ea Tests: Remove -disable-availability-checking in more tests that use concurrency.
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,
instead of disabling availability checking.
2024-10-19 12:35:20 -07:00
Pavel Yaskevich
d461eab3f0 [TypeChecker] Effects: Don't diagnose implicit AST nodes
Implicitly generated code requires checking but it doesn't have
to produce a diagnostic into the void.
2022-05-30 23:17:41 -07:00
Doug Gregor
eeeea49764 Remove -enable-experimental-concurrency almost everywhere. 2021-07-26 21:24:43 -07:00
Doug Gregor
b86e39d614 Remove "spawn" modifier 2021-07-26 10:22:02 -07:00
Doug Gregor
1e2012d816 Disable availability checking in tests that use concurrency 2021-07-20 12:46:26 -07:00
Doug Gregor
220e29d674 Reinstate "async let", with "spawn let" as an alias. 2021-05-07 00:13:56 -07:00
Doug Gregor
06dc77ddf3 Revert "[Concurrency] Resyntax 'async let' as 'spawn let'."
This reverts commit 41f42fabbf.
2021-05-06 22:18:36 -07:00
Doug Gregor
41f42fabbf [Concurrency] Resyntax 'async let' as 'spawn let'.
This helps track the proposal.
2021-04-29 23:28:16 -07:00
Doug Gregor
3c38ffe0ea [Concurrency] await try -> try await
The `try await` ordering is both easier to read and indicates the order
of operations better, because the suspension point occurs first and
then one can observe a thrown error.
2020-12-23 13:21:59 -08:00
Doug Gregor
dd7ce8015d [Concurrency] Reject top-level asynchronous code for now.
We haven't implemented any support for top-level async code yet, so
reject it in effects checking rather than crashing in the SIL verifier.
Fixes rdar://71512818.
2020-12-03 22:28:58 -08:00
Doug Gregor
290f9a5626 [Concurrency] Add an async let example with multiple initializer clauses 2020-11-05 00:09:26 -08:00
Doug Gregor
58b590aa3d [Concurrency] Wrap the initializer of 'async let' in an autoclosure call.
The initializer of an 'async let' is executed as a separate child task
that will run concurrently with the main body of the function. Model
the semantics of this operation by wrapping the initializer in an
async, escaping autoclosure (representing the evaluation of the child
task), and then a call to that autoclosure (to

This is useful both for actor isolation checking, which needs to treat
the initializer as executing in concurrent code, and also (eventually)
for code generation, which needs to have that code in a closure so
that it can be passed off to the task-creation functions.

There are a number of issues with this implementation producing
extraneous diagnostics due to this closure transformation, which will
be addressed in a follow-up commit.
2020-11-04 17:32:04 -08:00
Doug Gregor
9722df86e8 [Concurrency] Require references to 'async let' to have an 'await'.
Extend effects checking to ensure that each reference to a variable
bound by an 'async let' is covered by an "await" expression and occurs
in a suitable context.
2020-11-04 17:32:04 -08:00
Doug Gregor
7f738778b8 [Concurrency] Parse 'async let' declarations.
Perform very basic semantic analysis for their well-formedness.
2020-11-04 17:31:31 -08:00