[NFC] AST: Optimize GenericSignatureImpl::getInnermostGenericParams#31838
Merged
CodaFi merged 1 commit intoswiftlang:masterfrom Jun 4, 2020
Merged
[NFC] AST: Optimize GenericSignatureImpl::getInnermostGenericParams#31838CodaFi merged 1 commit intoswiftlang:masterfrom
CodaFi merged 1 commit intoswiftlang:masterfrom
Conversation
b3cf4ae to
95c16fc
Compare
Collaborator
Author
|
@swift-ci please smoke test |
Collaborator
Author
|
@CodaFi ping |
Contributor
|
After sitting down and reasoning about this transformation on paper, I think we're good here. There may be some worrying code that slips through the many, many assertions we have in the signature formation code that maintains the depth ordering invariant that allows this code to function, but we'll worry about that bridge when we cross it. ⛵ |
CodaFi
approved these changes
Jun 4, 2020
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
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.
Adding a fast path that enables us to simplify the successive loop.
Judging by the abundance of
BoundGenericType::getGenericArgsusage, we are going to have to callGenericSignatureImpl::getInnermostGenericParamsmuch more often once we start storing substitution maps in bound generic type nodes, so this is ensuring the latter is as fast as possible without caching.For #31895