swift
f33f1d36 - [Async CC] Always add full type metadata to bindings.

Commit
5 years ago
[Async CC] Always add full type metadata to bindings. 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
Author
Committer
Parents
Loading