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

fix VM branch #1302

Merged
merged 6 commits into from
Jun 7, 2021
Merged

fix VM branch #1302

merged 6 commits into from
Jun 7, 2021

Conversation

jasonwilliams
Copy link
Member

@jasonwilliams jasonwilliams commented Jun 2, 2021

The VM branch was failing to build. This uses the latest API changes made on Context.
This PR also introduces a new state to the executor, the Error state. This lets the VM know that an error has happened and immediately stops, leaving the error value on the top of the stack. Going forward this can be used to unwind the stack.
As the current path doesn't make use of this arm it should be backwards compatible.

@jasonwilliams jasonwilliams added the vm Issues and PRs related to the Boa Virtual Machine. label Jun 2, 2021
Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a test that at least builds this branch, to make sure it keeps working.

@@ -14,6 +14,7 @@ pub trait Executable {
pub(crate) enum InterpreterState {
Executing,
Return,
Error,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can allow the clippy lint that complains that this variant is never constructed, since it is only constructed with the vm feature on. Or maybe only compile it with the vm feature on?

@Razican Razican added this to the v0.12.0 milestone Jun 7, 2021
@Razican Razican merged commit ba3c4e5 into boa-dev:master Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vm Issues and PRs related to the Boa Virtual Machine.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants