-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Distributed] Emit accessors for distributed protocol requirements #72073
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
[Distributed] Emit accessors for distributed protocol requirements #72073
Conversation
…e underlying thunks Preparing to start emitting distributed requirement accessors that don't have `SILFunction *` because they are associated with protocol requirements.
…tocol requirements Given the following protocol: ``` protocol Greeter : DistributedActor { distributed func greet() } ``` The changes make it possible to synthesize a distributed accessor thunk for the requirement `greet` which would be dispatched to the underlying concrete actor implementation at runtime.
…ould be backed by SILFunction Distributed protocol requirements don't have associated SILFunction, let's introduce a more flexible way to define it that collects only the information necessary for the function to become accessible.
…rotocol requirements
… `$` mangling This way distributed thunks could be formed in contexts that don't know what concrete actor they'd be dispatched to on the other side i.e. `distributed` members in protocol extensions should refer to protocol requirement accessors.
@swift-ci please test |
auto emission = | ||
getCallEmission(IGF, callee.getSwiftContext(), std::move(callee)); | ||
|
||
emission->begin(); | ||
emission->setArgs(arguments, /*isOutlined=*/false, | ||
/*witnessMetadata=*/nullptr); | ||
Target.getWitnessMetadata(actorSelf)); |
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.
gotcha 👍
…ObjC interop is disabled
3525758
to
c00c692
Compare
@swift-ci please test Linux platform |
@swift-ci please test macOS platform |
@swift-ci please test Windows platform |
We may need a clean build?
|
@swift-ci please clean test macOS platform |
@swift-ci please smoke test |
@swift-ci please smoke test Linux platform |
all tests passed but there was a merge conflict, I resolved it @swift-ci please smoke test |
@swift-ci please smoke test |
Previous comment didn’t trigger CI for some reason. |
@swift-ci please smoke test |
Given the following protocol:
The changes make it possible to synthesize a distributed accessor thunk for
the requirement
greet
which would be dispatched to the underlyingconcrete actor implementation at runtime.