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

Change code generation to use variables to simulate the stack #12

Open
lucabol opened this issue Jan 17, 2022 · 0 comments
Open

Change code generation to use variables to simulate the stack #12

lucabol opened this issue Jan 17, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lucabol
Copy link
Owner

lucabol commented Jan 17, 2022

This is to help the optimizer, which works better with variables than memory access. The idea is to add new vars to represent new values pushed on the stack and keep somewhere the definition of which vars correspond to stack positions.

// push 2 on the stack
var x34 = 2
// modify a data structure to say that x34 is top of stack
stackpostions.add(34);
@lucabol lucabol added enhancement New feature or request help wanted Extra attention is needed labels Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant