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

STORE ops should not leave the value on the stack #19

Open
p7g opened this issue Dec 13, 2020 · 0 comments
Open

STORE ops should not leave the value on the stack #19

p7g opened this issue Dec 13, 2020 · 0 comments

Comments

@p7g
Copy link
Owner

p7g commented Dec 13, 2020

Rather than having the majority of store operations require a following OP_POP to remove the value from the stack, the store instruction should not leave a value on the stack. If we need the value to be left there (i.e. assignment expression), it should be implemented as a duplication of the top of the stack and then storing one of those values.

This should have a slight performance improvement, and will reduce the amount of bytecode needed in most cases.

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

No branches or pull requests

1 participant