-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Async CC] Always add full type metadata to bindings. #34896
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
[Async CC] Always add full type metadata to bindings. #34896
Conversation
NecessaryBindings are used by both async functions and partial apply forwarders. The latter are able to avoid bindings in some cases because a new function is generated where the information that would otherwise be available in the bindings can be made available. That is not the case for async functions. A generic async function requires all of the metadata and witness tables be passed along to it: unlike a partial apply forwarder it isn't in any way specialized so this information can't be recovered. Previously, metadata bindings were always passed along to async functions. However, destructuring that can be done for partial apply forwarders was still being applied. This resulted in an inappropriate and unexpected number of bindings in NecessaryBindings. Here, that destructuring is avoided for metadata passed to async functions. Now, the full metadata required by async functions are passed along to them as necessary. rdar://problem/71816041
|
@swift-ci please test |
|
Build failed |
|
@swift-ci please test macos platform |
|
Build failed |
|
@swift-ci please clean test macos platform |
|
Build failed |
|
@swift-ci please clean test macos platform |
|
Build failed |
|
@swift-ci please clean test macos platform |
|
Build failed |
|
@swift-ci please clean test macos platform |
|
Build failed |
|
@swift-ci please test macos platform |
|
Build failed |
|
@swift-ci please test macos platform |
|
Build failed |
|
@swift-ci please test macos platform |
|
Build failed |
|
@swift-ci please test macos platform |
|
Build failed |
|
@swift-ci please clean test macos platform |
|
Build failed |
|
@swift-ci please clean test macos platform |
|
Build failed |
|
@swift-ci please test macos platform |
NecessaryBindings are used by both async functions and partial apply forwarders. The latter are able to avoid bindings in some cases because a new function is generated where the information that would otherwise be available in the bindings can be made available. That is not the case for async functions. A generic async function requires all of the metadata and witness tables be passed along to it: unlike a partial apply forwarder it isn't in any way specialized so this information can't be recovered.
Previously, metadata bindings were always passed along to async functions. However, destructuring that can be done for partial apply forwarders was still being applied. This resulted in an inappropriate and unexpected number of bindings in NecessaryBindings.
Here, that destructuring is avoided for metadata passed to async functions.
Now, the full metadata required by async functions are passed along to them as necessary.
rdar://problem/71816041