Skip to content

SILParser: Fix for removal of parse-time name lookup #33922

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
merged 4 commits into from
Sep 12, 2020

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Sep 11, 2020

The SIL parser parses "dismebodied" GenericParamLists that are not associated with a Decl, and do not appear in the ASTScope tree. The parser would bind IdentTypeReprs that referenced these generic parameter lists using parse-time lookup.

In order to make this work when parse-time lookup is disabled, we have to plumb GenericParamLists through the SIL parser in various places, and also teach Sema's resolveType() to handle them.

When parse-time lookup is disabled, we can't rely on the parser
binding IdentTypeReprs that name generic parameters, so we do it
in type resolution by having the SIL parser supply a GenericParamList.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

for (auto &fieldRepr : repr->getFields()) {
fieldRepr.getFieldType()->dump();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remnants of a debug session?

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, thank you!

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov requested a review from CodaFi September 12, 2020 00:59
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - dbdbbff

@slavapestov slavapestov changed the title SILParser: Overhaul to not rely on parse-time lookup SILParser: Fix for removal of parse-time name lookup Sep 12, 2020
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@slavapestov slavapestov merged commit 1298f71 into swiftlang:master Sep 12, 2020
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