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

Prevent stack trashing #265

Closed
wants to merge 27 commits into from
Closed

Prevent stack trashing #265

wants to merge 27 commits into from

Conversation

SuperFola
Copy link
Member

Should close #250

Not ready for production

@github-actions github-actions bot added ark/compiler Related to the compiler ark/virtual machine Related to the ark virtual machine labels Jun 5, 2021
@SuperFola
Copy link
Member Author

The goal is to prevent this code from crashing the VM

(mut i 0)
(while (< i 10000) {
  1
  (set i (+ 1 i))
})

@SuperFola
Copy link
Member Author

This could be handled by the optimizer, through an internal keyword Pop, so that the compiler only needs to add a POP instruction after compiling a (Keyword::Pop code).

This is only moving the problem away, but I think it can make the code better

@SuperFola SuperFola added this to the 3.1.0 milestone Jun 12, 2021
@SuperFola SuperFola linked an issue Jun 14, 2021 that may be closed by this pull request
@github-actions github-actions bot added the ark/parser Parser related label Jun 14, 2021
@SuperFola SuperFola self-assigned this Jun 14, 2021
@SuperFola SuperFola modified the milestones: 3.1.0, 3.2.0 Jun 29, 2021
@SuperFola SuperFola closed this Sep 29, 2021
@SuperFola SuperFola deleted the prevent-stack-trashing branch October 29, 2021 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ark/compiler Related to the compiler ark/parser Parser related ark/virtual machine Related to the ark virtual machine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite optimizer to have room for other optimizations Dump unused return values
1 participant