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

pulley: Fix interpreter push/pop #9644

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alexcrichton
Copy link
Member

  • Add stack-overflow checking to push and other decrements of sp.
  • Fix the up/down direction of push/pop (push goes down, pop goes up).
  • Fix the order of operation sin push, first decrement then write.
  • Move methods to Interpreter to use ControlFlow more heavily.

* 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.
* Add stack-overflow checking to `push` and other decrements of `sp`.
* Fix the up/down direction of push/pop (`push` goes down, `pop` goes up).
* Fix the order of operation sin `push`, first decrement then write.
* Move methods to `Interpreter` to use `ControlFlow` more heavily.
@alexcrichton alexcrichton requested a review from a team as a code owner November 21, 2024 02:25
@alexcrichton alexcrichton requested review from cfallin and removed request for a team November 21, 2024 02:25
@alexcrichton
Copy link
Member Author

Review-wise this is stacked on #9629

@github-actions github-actions bot added the pulley Issues related to the Pulley interpreter label Nov 21, 2024
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pulley Issues related to the Pulley interpreter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant