Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.0] Add support for sending #73743

Merged
merged 5 commits into from
May 20, 2024

Conversation

gottesmm
Copy link
Contributor

Explanation: This commit adds support for sending to 6.0. It leaves in support temporarily for transferring but puts in a warning that tells users to use sending instead. Importantly beyond the parser/clang importer, the internals of the compiler all use sending. So once we decide transferring can go, we can just eliminate the parser support and we are good to go.

Radars:

  • rdar://128216574

Original PRs:

Risk: Low. Just affects region isolation.
Testing: Added tests to the test suite.
Reviewer: N/A

…' instead of 'transferring'.

We still only parse transferring... but this sets us up for adding the new
'sending' syntax by first validating that this internal change does not mess up
the current transferring impl since we want both to keep working for now.

rdar://128216574
(cherry picked from commit e3e78ad)
…ransferring.

Just trying to slice off a larger change where I change these tests to actually
use 'sending'. This is nice to do now since it is algebraic to do.

rdar://128216574
(cherry picked from commit 71e95b9)
A few things:

1. Internally except for in the parser and the clang importer, we only represent
'sending'. This means that it will be easy to remove 'transferring' once enough
time has passed.

2. I included a warning that suggested to the user to change 'transferring' ->
'sending'.

3. I duplicated the parsing diagnostics for 'sending' so both will still get
different sets of diagnostics for parsing issues... but anywhere below parsing,
I have just changed 'transferring' to 'sending' since transferring isn't
represented at those lower levels.

4. Since SendingArgsAndResults is always enabled when TransferringArgsAndResults
is enabled (NOTE not vis-a-versa), we know that we can always parse sending. So
we import "transferring" as "sending". This means that even if one marks a
function with "transferring", the compiler will guard it behind a
SendingArgsAndResults -D flag and in the imported header print out sending.

rdar://128216574
(cherry picked from commit b780ff6)
I am doing this after the main transformation to ease commit by commit
understanding of the change.

rdar://128216574
(cherry picked from commit 7592842)
…e SE-0430 an upcoming feature.

I also added support for expressing suppressable upcoming features.

rdar://128216574
(cherry picked from commit 20a3589)
@gottesmm
Copy link
Contributor Author

@gottesmm gottesmm merged commit fe80a87 into swiftlang:release/6.0 May 20, 2024
5 checks passed
@gottesmm gottesmm deleted the release/6.0-sending-rename branch May 20, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants