bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
15.43k stars 1.31k forks source link

Refactor Pulley's interpreter loop #9629

Open alexcrichton opened 2 days ago

alexcrichton commented 2 days ago

This is roughly intended to be perf-neutral but we don't have many automated benchmarks yet for Pulley so it's intended to profile later as well.

alexcrichton commented 2 days ago

cc @fitzgen @Kmeakin

abrown commented 2 days ago

@fitzgen, I'll leave this for you for when you get back as I assume you have stronger opinions on this level of changes.

github-actions[bot] commented 1 day ago

Subscribe to Label Action

cc @fitzgen

This issue or pull request has been labeled: "pulley" Thus the following users have been cc'd because of the following labels: * fitzgen: pulley To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file. [Learn more.](https://github.com/bytecodealliance/subscribe-to-label-action)
Kmeakin commented 1 day ago

cc @fitzgen @Kmeakin

No objections from me

alexcrichton commented 1 day ago

I've done a bit more refactoring here with the goal of modeling the interpreter as an implementation of OpVisitor and ExtendedOpVisitor. This should help improve error messages and type-checking for missing operations when new ones are added.

alexcrichton commented 1 day ago

I think that @fitzgen may be out for another week or so and I'm starting to accumulate other changes built on this, so @abrown would you be ok approving this from a "lgtm" point of view? Pulley is still under heavy development so it should be ok to break things/regress things temporarily and I'm happy to take responsibility for following-up on this with Nick when he's back.