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

refactor: introduce Interpreter trait and merge RuntimeState/GasometerState #250

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

sorpaas
Copy link
Member

@sorpaas sorpaas commented Dec 5, 2023

In Rust, the current best method of doing interpretation is not available -- to implement things like direct threading (to avoid extra jumps), we'll need either goto, or guaranteed tail optimization. It's therefore best if we make the actual execution code generic so that people can use what's best on their targets (for example, tail optimization works on x86 but not really on wasm). Eventually, we'd also want to have at least two different modes -- a baseline, and an analyzed, where the former try to use as little memory as possible, and the latter are allowed to use more, optimizing for speed.

When handling substate merging, we currently differentiate runtime vs. gasometer, which is unnecessary. So we merge them together -- gasometer is just a state in the machine's runtime.

@sorpaas sorpaas merged commit d224901 into master Dec 5, 2023
3 checks passed
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.

1 participant