Resolve symbol types in symbol table#2
Merged
chrisr-diffblue merged 4 commits intochrisr-diffblue:external_parser_support_rebasefrom Jul 5, 2018
Conversation
Owner
chrisr-diffblue
left a comment
There was a problem hiding this comment.
Also, we should figure out how to synchronize this branch with @smowton's original branch....
| irept &irep, | ||
| const namespacet &ns) | ||
| { | ||
| if(irep.id() == ID_symbol) |
Owner
There was a problem hiding this comment.
Can't this whole if block be replaced with a single call to ns.follow_symbol(irep) ?
Author
There was a problem hiding this comment.
The follow_symbol() method follows both type symbols and non-type symbols, but we only want to replace type symbols. So we first do the check if(symbol.is_type) and only do the follow in this case.
Owner
There was a problem hiding this comment.
Ah, right - got it... A couple of observations:
- This should probably be renamed to
follow_type_symbolsto match the naming offollow_symbols - Should either this
follow_type_symbolsfunction be moved intonamespace.cppas a utility function there, or should ns.follow_symbol() grow an extra argument (with a default value) that specifies whether to follow non-type symbols or not, and then just use that where we need it instead?
Author
There was a problem hiding this comment.
Ah yes. I think I'll move the new follow_type_symbols function to namespace.cpp.
af2e8bd to
e262b18
Compare
e262b18 to
95af4f9
Compare
5d0c656
into
chrisr-diffblue:external_parser_support_rebase
chrisr-diffblue
pushed a commit
that referenced
this pull request
Aug 17, 2018
chrisr-diffblue
pushed a commit
that referenced
this pull request
Mar 28, 2019
We should keep the struct tag type, not follow it and get the struct type
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.
This resolves the type symbols to the pointed-to types in the symbol table before creating the goto program, when reading a json goto program file.