Skip to content
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

Simplify symbol table: now a stack with locals on top hiding globals … #28

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tfisher98
Copy link

…below.

@rswier
Copy link
Owner

rswier commented Mar 7, 2017

This doesn't work if a function declares a local with the same name as a global. The Hxx fields were designed to save and restore the global Class/Type/Val in that case. Although with a bit of work, you may be able to handle that case with your new approach.

@tfisher98
Copy link
Author

You were right; it didn't work. I think I fixed it, but the case for it being a simplification is not so strong anymore. More it is just a slightly different approach. It has the upside that it generalizes more easily to allowing additional nested local scopes. And it is still at -1 net lines of code :^)

@rswier
Copy link
Owner

rswier commented Mar 8, 2017

This is very interesting and clever!

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.

2 participants