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

Add runtime version and remove version check hacks #818

Merged

Conversation

jberg
Copy link
Collaborator

@jberg jberg commented Jul 20, 2019

No description provided.

function jumpToOffset(offset) {
const nextCommandIndex = offsetToCommand[offset];
return nextCommandIndex - 1;
}
Copy link
Owner

Choose a reason for hiding this comment

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

Nice! Eventually I would like to move this into the parser, but having it in one place here in the VM is a huge first step to being able to rip it out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh hadn't even thought about how we could just do that in the parser once and be done, sounds good!

Copy link
Owner

Choose a reason for hiding this comment

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

It's going to be a little annoying, since we will need to do it after all the command parsing is done. That means we will need to do a second pass which knows which opcodes have arguments which are command offsets.

@captbaritone
Copy link
Owner

That was way easier than I expected. Nice work!

@captbaritone captbaritone merged commit 06f3a47 into captbaritone:master Jul 20, 2019
captbaritone pushed a commit that referenced this pull request Nov 30, 2019
* add runtime version and remove version check hacks

* move jump logic into a shared function
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.

None yet

2 participants