-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Use the distributed thunk for non-distributed protocol requirements #59514
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
Use the distributed thunk for non-distributed protocol requirements #59514
Conversation
When a synchronous, actor-isolated declaration witnesses an asynchronous, not-similarly-isolated requirement, emit an actor hop within the witness thunk to ensure that we properly enter the context of the actor. Fixes swiftlang#58517 / rdar://92881539. (cherry picked from commit 25a7988)
…hunk We cannot hop to a distributed actor directly, so call through the distributed thunk instead. (cherry picked from commit 840b7ea)
When a distributed-actor-isolated witness is provided for a non-distributed-actor-isolated requirement, always hop to the distributed thunk. While here, mark distributed thunks as being `final`, to ensure that we always statically call them vs. trying to retrieve them from the vtable (since they aren't in the vtable).
@swift-ci please test |
Huh, only the last commit is new. The rest got merged already as part of #59456 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thank you!
@swift-ci please build toolchain |
Unrelated macOS failure: |
@swift-ci please test macOS |
The failing test was reverted @swift-ci please test macOS |
Cherry pick of #59513 |
When a distributed-actor-isolated witness is provided for a
non-distributed-actor-isolated requirement, always hop to the
distributed thunk.
While here, mark distributed thunks as being
final
, to ensure thatwe always statically call them vs. trying to retrieve them from the
vtable (since they aren't in the vtable).
Fixes the rest of the distributed part of rdar://92881539.