Skip to content

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

Open
tfisher98 wants to merge 3 commits into
rswier:masterfrom
tfisher98:symtable-simplify
Open

Simplify symbol table: now a stack with locals on top hiding globals …#28
tfisher98 wants to merge 3 commits into
rswier:masterfrom
tfisher98:symtable-simplify

Conversation

@tfisher98
Copy link
Copy Markdown

…below.

@rswier
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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