alexcrichton requested abrown for a review on PR #9629.
alexcrichton requested wasmtime-default-reviewers for a review on PR #9629.
alexcrichton opened PR #9629 from alexcrichton:refactor-pulley-loop
to bytecodealliance:main
:
- Define loop-over-match and loop-with-tail-calls in separate files to make it more clear which is in which (and less
#[cfg]
)- Move per-opcode handlers to
interp.rs
outside of a macro invocation to get better native editor support (e.g. formatting, hints, etc).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.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton commented on PR #9629:
cc @fitzgen @Kmeakin
abrown requested fitzgen for a review on PR #9629.
@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 on PR #9629:
Subscribe to Label Action
cc @fitzgen
<details>
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 <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
Kmeakin commented on PR #9629:
cc @fitzgen @Kmeakin
No objections from me
alexcrichton updated PR #9629.
alexcrichton commented on PR #9629:
I've done a bit more refactoring here with the goal of modeling the interpreter as an implementation of
OpVisitor
andExtendedOpVisitor
. This should help improve error messages and type-checking for missing operations when new ones are added.
alexcrichton commented on PR #9629:
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.
abrown submitted PR review:
Makes sense to me; take my comment below with a grain of salt since I wasn't involved in initially designing this (but, yeah, it isn't too clear _when_ interpretation is occurring in the two modes).
abrown created PR review comment:
One thing that is confusing here (and that I realize is present in the previous version as well) is that that the decoder is actually calling the visitor that does the interpretation. To avoid the reader looking around for "where is the handler that gets called here?" perhaps in the future we think through a different way to surface what is happening here; alternately, a comment here could be helpful.
abrown created PR review comment:
TIL: break with expressions is a thing...
abrown submitted PR review.
abrown created PR review comment:
Alternately, rename the
decode_one
function?
alexcrichton updated PR #9629.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Good points! I've tried to add more words here to explain what's going on
alexcrichton commented on PR #9629:
Ok I'm going to flag this for merging but @fitzgen you'll definitely be interested in this for when you get back, and I'm happy to address any feedback you have in follow-ups.
alexcrichton has enabled auto merge for PR #9629.
alexcrichton merged PR #9629.
fitzgen submitted PR review:
LGTM!
Last updated: Dec 23 2024 at 13:07 UTC