-
Couldn't load subscription status.
- Fork 25
1721 semantic domain lite #1722
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
Conversation
move down, to squash to squash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been assigned to this PR, but at this time this PR is not compatible with CFG/DFA because in ProgramSymbol the method ResolveReference has been removed, this method is used in CFG/DFA.
ResolveReference has been validated in CrossChecker using the definition #if DOMAIN_CHECKER.
All Tests have passed against this directive. As this PR is intended to be used for CFG/DFA ResolveReference must be included too.
I remember ResolveReference algorithm has discovered the following issue Fix global name resolution #1360
|
@mayanje Weve discussed it many times, CFG and DFA will now use the Dictionary StorageAreaReadsSymbol and StorageAreaWritesSymbol on Node. You can look at my private branch so see how it works: @osmedile Ok but your private branch is not this branch, so where is the discussion? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I answered to @osmedile his private branch is not this branch, so where is the discussion?
So I think the ResolveReference method in ProgramSymbol must be kept, and only adapted to use StorageAreaReadsSymbol instead. So that I will not have to change CFG/DFA symbol lookup mechanism.
In the current PR it seems that the StorageAreaReadsSymbol is not alimented with VariableSymbol. instances
|
The dictionaries are populated in CrossChecker, you can see it at line 651. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fm-117 can you re add the ResolveReference method in ProgramSymbol so that it uses the StorageAreaReadsSymbol dictionary?
public Scope.MultiSymbols ResolveReference(SymbolReference symRef, bool bRecurseEnglobingPrograms)
in CFG/DFA the parameter bRecurseEnglobingPrograms) is always set to true
|
See #1731 for rebased version. |
Link to issue : #1721.
This PR integrates SemanticDomain objects with the exception of :
NamespaceSymbolandRootSymbolTableclassesResolve*methodsRenamesSymboland associated code have also been discardedAs a consequence, some alterations had to be made. Resolution of variables is still done through SymbolTable and type linking is not performed in SemanticDomain.
Important spots for the next steps of SD integration have been marked with
TODO SemanticDomain.While working on this PR, I noticed some potential improvements :
PointerTypeclass is currently not used)Ownerof a symbol. This may lead to useless affectations or errorsThose should be discussed all together to improve the overall quality and stability of the code.