-
Notifications
You must be signed in to change notification settings - Fork 10.5k
SILGen: Caller-side codegen for invoking foreign async functions #34525
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
Conversation
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please smoke test |
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.
Looks like a great start!
@swift-ci Please test |
Build failed |
Build failed |
Immediately before invoking the ObjC API, get the current continuation, capture it into a block to pass as the completion handler, and then await the continuation, whose resume/error successors serve as the semantic return/throw result of the call. This should complete the caller-side part of SILGen; the completion handler block implementation is however still only a stub.
…time. To manage code size in user binaries, we want to be able to implement common completion handler signatures in the Swift runtime once. Using a different mangling for these lets us add new ones without clobbering symbols in existing binaries.
7addae2
to
4b33f26
Compare
@swift-ci Please test |
@swift-ci Please test |
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.
Nifty!
Build failed |
@swift-ci Please test Linux |
Immediately before invoking the ObjC API, get the current continuation, capture it into a block to
pass as the completion handler, and then await the continuation, whose resume/error successors
serve as the semantic return/throw result of the call. This should complete the caller-side part
of SILGen; the completion handler block implementation is however still only a stub.