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

Restructure analyzer type inference to pass data around on the stack or in a visitor field #35324

Open
stereotype441 opened this Issue Dec 5, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@stereotype441
Member

stereotype441 commented Dec 5, 2018

The current implementation of type inference in the analyzer uses InferenceContext.getContext and InferenceContext.setType to pass type information up and down the AST when performing downward and upward type inference. This is inefficient, since these methods are implemented in terms of AstNode.getProperty and AstNode.setProperty, which store data in maps. It also makes the analyzer harder to hack on, because it hides the flow of type information between AST nodes during type inference. It would be nice to restructure this so that type information is passed upwards and downwards on the stack, or in a field of the corresponding visitor class.

@stereotype441 stereotype441 changed the title from Restructure analyzer type inference to pass data around on the stack to Restructure analyzer type inference to pass data around on the stack or in a visitor field Dec 5, 2018

@MichaelRFairhurst

This comment has been minimized.

Contributor

MichaelRFairhurst commented Dec 6, 2018

gonna mention myself here @MichaelRFairhurst as a reminder that I may want to try time for this..!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment