-
Notifications
You must be signed in to change notification settings - Fork 10.6k
IRGen: Create full async functions for partial apply forwarders #36700
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
IRGen: Create full async functions for partial apply forwarders #36700
Conversation
External async functions pointers can't be used to clone the async context size from. Future improvement: reinstate the previous optimization of reusing the context. rdar://76029017
|
@swift-ci Please test |
|
Build failed |
|
@swift-ci Please smoke test macOS |
1 similar comment
|
@swift-ci Please smoke test macOS |
|
@swift-ci Please clean smoke test macOS |
1 similar comment
|
@swift-ci Please clean smoke test macOS |
| asyncFunctionPtr = | ||
| emitAsyncFunctionPointer(IGM, fwd, entity, asyncLayout->getSize()); | ||
| // TODO: if calleeAFP is definition: | ||
| #if 0 |
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.
Should this still be here?
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.
Yes. We will want to reinstate the old code conditionally later. This serves as a reminder for me how-to do it.
|
@swift-ci please test macOS |
|
Build failed |
|
@swift-ci please test macOS |
Previously, because partial apply forwarders for async functions were not themselves fully-fledged async functions, they were not able to handle dynamic functions. Specifically, the reason was that it was not possible to produce an async function pointer for the partial apply forwarder because the size to be used was not knowable. Thanks to swiftlang#36700, that cause has been eliminated. With it, partial apply forwarders are fully-fledged async functions and in particular have their own async function pointers. Consequently, it is again possible for these partial apply forwarders to handle non-constant function pointers. Here, that behavior is restored, by way of reverting part of ee63777 while preserving the ABI it introduced. rdar://76122027
External async functions pointers can't be used to clone the async
context size from.
Future improvement: reinstate the previous optimization of reusing the
context.
rdar://76029017