Skip to content

🍒[5.7][Distributed] Implement distributed computed properties via special accessor #59809

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

Merged
merged 22 commits into from
Jun 30, 2022

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jun 30, 2022

Description: Implements computed distributed get-only properties using a special accessor implementation approach. This implements a missing piece of the distributed feature, by @xedin
Risk: Low, unlocks missing functionality and does not affect existing code.
Review by: @DougGregor
Testing: PR testing on CI
Original PR: #59700
Radar: rdar://91283164

Depends on #59736 for a clean cherry pick;
Let's first merge #59736 which also has addressed the comments by now, and then this and it'll apply cleanly 👍

ktoso and others added 21 commits June 30, 2022 21:10
`DistributedThunk` is to be used while accessing 'distributed'
computed property outside of its actor context.
This strategy is used to dispatch accesses to 'distributed' computed
property to distributed thunk accessor instead of a regular getter
when access happen outside actor isolation context.
The flag is used to distinguish between regular functions/accessors
and synthesized distributed thunks.
…uted thunks

Distributed thunks have to refer to the "local" version
of the property directly with implicit `self.` base.
…Decl`

One step towards future distributed subscripts.
Only distributed functions and computed properties should be
accepted, everything else is invalid.
It used to be an accessor but that is not required because
SILDeclRef controls mangling which is the most imprortant
and could be used to emit the right reference.
@ktoso ktoso added the distributed Feature → concurrency: distributed actor label Jun 30, 2022
@ktoso ktoso requested a review from a team as a code owner June 30, 2022 12:24
@ktoso
Copy link
Contributor Author

ktoso commented Jun 30, 2022

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Jun 30, 2022

@swift-ci please test

@ktoso ktoso added the r5.7 label Jun 30, 2022
@ktoso
Copy link
Contributor Author

ktoso commented Jun 30, 2022

@swift-ci please test

@ktoso ktoso force-pushed the pick-dist-properties-xedin branch from eea5af6 to 50e04f2 Compare June 30, 2022 14:46
@ktoso
Copy link
Contributor Author

ktoso commented Jun 30, 2022

@swift-ci please test

@DougGregor DougGregor merged commit 1609122 into swiftlang:release/5.7 Jun 30, 2022
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants