-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Async CC] Support for protocol witness methods. #34211
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
Merged
nate-chandler
merged 12 commits into
swiftlang:main
from
nate-chandler:concurrency/irgen/protocol-witness-methods
Oct 7, 2020
Merged
[Async CC] Support for protocol witness methods. #34211
nate-chandler
merged 12 commits into
swiftlang:main
from
nate-chandler:concurrency/irgen/protocol-witness-methods
Oct 7, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, the polymorphic arguments were being discarded. Here, that situation is improved by pulling the polymorphic arguments out of the explosion when having the polymorphic parameters via the NecessaryBindings instance. In order to eanble that, an overload of NecessaryBindings::save is added which takes an explosion and asserts that the polymorphic parameter pulled from the explosion matches with the polymorphic parameter in the NecessaryBindings instance.
Use the TypeInfo for the argument lowering type of the self parameter rather than for the self parameter's type itself.
Previously the methods for getting the index into the layout were public and were being used to directly access the underlying buffer. Here, that abstraction leakage is fixed and field access is forced to go through the appropriate methods.
Previously a raw CreateLoad was used, which happened to be fine. Here, a TI is used, explicitly clarifying that the indirect return is taken.
Previously, the indirect results were claimed from the explosion after the arguments were claimed. That failed to match the order in which arguments actually appear in the explosion. Here the order is reversed.
Previously, the AsyncContextLayout did not make space for the trailing witness fields (self metadata and self witness table) and the AsyncNativeCCEntryPointArgumentEmission could consequently not vend these fields. Here, the fields are added to the layout.
Previously the same code was used for loading values from the async context. Here, that same code is extracted into a private method.
Previously the same code was used for saving values into the async context. Here, that code is extracted into a private method.
Previously the code for loading indirect returns was inline in the member function where it was performed. Here it is pulled out into a private method.
@swift-ci please test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #34200 .
Previously, the AsyncContextLayout did not make space for the trailing witness fields (self metadata and self witness table) and the AsyncNativeCCEntryPointArgumentEmission could consequently not vend these fields. Here, the fields are added to the layout.
Additionally, corrected ordering of indirect results. Previously, the indirect results were claimed from the explosion after the arguments were claimed. That failed to match the order in which arguments actually appear in the explosion. Here the order is reversed.