Skip to content

Conversation

@aschwaighofer
Copy link
Contributor

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

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
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Apr 1, 2021

Build failed
Swift Test OS X Platform
Git Sha - 7ae0b1d

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please smoke test macOS

1 similar comment
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please clean smoke test macOS

1 similar comment
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please clean smoke test macOS

asyncFunctionPtr =
emitAsyncFunctionPointer(IGM, fwd, entity, asyncLayout->getSize());
// TODO: if calleeAFP is definition:
#if 0
Copy link
Member

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?

Copy link
Contributor Author

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.

@aschwaighofer
Copy link
Contributor Author

@swift-ci please test macOS

@swift-ci
Copy link
Contributor

swift-ci commented Apr 1, 2021

Build failed
Swift Test OS X Platform
Git Sha - 7ae0b1d

@aschwaighofer
Copy link
Contributor Author

@swift-ci please test macOS

@aschwaighofer aschwaighofer merged commit 3de7f6f into swiftlang:main Apr 2, 2021
nate-chandler added a commit to nate-chandler/swift that referenced this pull request Apr 6, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants