Repository navigation
Conversation
Contributor
Author
|
Cross-repo with swiftlang/swift-syntax#3498 @swift-ci please test |
ktoso
force-pushed
the
wip-ktoso-stack-send-02-send-expression
branch
from
October 30, 2026 03:27
4bc38b4 to
9603211
Compare
Base automatically changed from
wip-ktoso-stack-send-01-sync-operation-task-minimal
to
main
October 30, 2026 04:33
Add the experimental `SendCalls` feature and the `SendExpr` AST node, and parse `send <call>` in the C++ parser and in ASTGen. `send` is a contextual keyword, recognized only when it is followed on the same line by an identifier, `self` or a `$` identifier; the type checker rejects `send` calls for now.
Type check and lower `send` calls: the callee must be actor isolated, return `Void` and not throw, and the arguments are evaluated at the call site. A synchronous callee is enqueued through the `_enqueueOneway` helpers in `Actor+Send.swift`, an async callee runs in a discarding task which starts on the callee's actor.
…elpers Instead of silently falling back to the task-based lowering, which changes the semantics of the call, emit `'send' requires newer _Concurrency library`.
Report `SendCalls` as used by a declaration whose printed inlinable body contains a `send`, so that the module interface guards it with `$SendCalls`.
…end` in the caller Caller-side default arguments like `#isolation` were evaluated in the operation closure, so they saw its isolation rather than the caller's, and an explicit `#isolation` argument crashed the AST verifier with a duplicate macro discriminator once it was moved back to the call site. Evaluate them at the call site like any other argument, and assign macro discriminators before moving the expansions into the closure.
ktoso
force-pushed
the
wip-ktoso-stack-send-02-send-expression
branch
from
October 30, 2026 04:33
9603211 to
5316d5e
Compare
Contributor
Author
|
@swift-ci please test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't review yet, I'm looking into setting up a PR stack so it's more easily reviewable. This will get cleaned up a bunch more still, I'll mark not-draft when ready.
The related changes in Swift Syntax: swiftlang/swift-syntax#3498 also all gated behind experimental feature for now, so we can rename it.