This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Name mangling for imported internal declarations (after symbol resolution)#370
Merged
bamarsha merged 34 commits intofeatures/access-modifiersfrom Mar 16, 2020
Merged
Conversation
added 17 commits
March 12, 2020 23:51
bettinaheim
approved these changes
Mar 14, 2020
Contributor
bettinaheim
left a comment
There was a problem hiding this comment.
It looks like good progress. I assume the only failing tests are the ones you added for multiple references with the same internal declaration? If so, then I'd suggest to comment those out and make a separate PR that reenables those tests and addresses the remaining two boxes on your todo list.
bettinaheim
approved these changes
Mar 15, 2020
Contributor
bettinaheim
left a comment
There was a problem hiding this comment.
Looks good. One minor thing related to the test project setup.
This was referenced Mar 15, 2020
This was referenced Mar 16, 2020
bettinaheim
suggested changes
Mar 16, 2020
Contributor
bettinaheim
left a comment
There was a problem hiding this comment.
Somewhere in this PR you have lost the range information for udts in argument tuples. There is a failing code gen test in the runtime repo.
Contributor
|
@MarshallSA Found the issue: The changes here seem to have gotten lost. I'll make a PR to this branch shortly. |
bettinaheim
approved these changes
Mar 16, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is an alternative to PR #360, part of issue #259. Instead of name mangling as soon as references are loaded (before symbol resolution), name mangling is run just before the syntax tree is built in
QsCompilation.Build. The benefit is that it is easier to show specific error messages for inaccessible symbols, instead of an "unknown symbol" message.Because this happens after symbol resolution, the symbol table needs to be updated to accommodate multiple declarations for a single callable or type if some of them belong to a project/package reference. Thus, the logic for resolving symbols in the symbol table has been refactored so that it is more flexible.
TODO in this PR:
QsCompilation.BuildTODO in the next PR: