-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix arg cleanup for objc continuations #38556
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 test |
Build failed |
171ca1a
to
3b739e2
Compare
@swift-ci test |
Build failed |
39aff13
to
7224888
Compare
@swift-ci test |
7224888
to
518e9da
Compare
Current SILGen for objc continuations, can end the lifetime of args before await_async_continuation. This PR fixes it by extending the lifetime of the args until await_async_continuation by creating copies. And then inserts manual cleanup with fix_lifetime + destroy Fixes rdar://78982371
518e9da
to
3372ab7
Compare
@swift-ci 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.
LGTM in terms of the SILGen. @jckarter can talk semantically if we always want to do this in this context. But this should be safe and not move scopes around.
@jckarter does this version look okay ? |
LGTM, thanks @meg-gupta ! |
Current SILGen for objc continuations, can end the lifetime of args
before await_async_continuation.
This PR fixes it so that the cleanups of args for such applies can be
delayed until result plan emission which generates
await_async_continuation
.Also inserts fix_lifetime cleanup so that optimizer cannot move lifetime ending operations before
await_async_continuation
Fixes rdar://78982371