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

gh-104584: Support most jumping instructions #106393

Closed
wants to merge 9 commits into from

Commits on Jul 7, 2023

  1. Hacky way to implement jump ops

    Introduce a new macro, JUMP_POP_DISPATCH(x, n).
    This does JUMPBY(x), STACK_SHRINK(n), DISPATCH().
    Most JUMP opcodes can use this.
    The exceptions are SEND, JUMP_BACKWARD, and JUMP_BACKWARD_NO_INTERRUPT.
    For JUMP_BACKWARD, I have to research whether CHECK_EVAL_BREAKER() and JUMPBY() commute.
    I think I'll just punt on SEND (it's too complex anyways).
    gvanrossum committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    d31d003 View commit details
    Browse the repository at this point in the history
  2. Make JUMP_BACKWARD[_NO_INTERRUPT] viable

    This involves some subtle rearrangement of code in JUMP_BACKWARD.
    gvanrossum committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    b886ca6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    28b3951 View commit details
    Browse the repository at this point in the history
  4. Make POP_JUMP_IF_FALSE/TRUE conditionally jump

    This may destroy the symmetry or slow things down,
    but (for now) it's needed so that the executor can
    at least avoid bailing when the jump is not taken.
    (The original code was doing a jump 0 in that case.)
    gvanrossum committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    0825696 View commit details
    Browse the repository at this point in the history
  5. Implement JUMP_TO_TOP special uop

    If JUMP_BACKWARD jumps to the start of the trace, add this.
    It contains an eval breaker check.
    gvanrossum committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    1df7b84 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d6235ee View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6cd5719 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b33a1a2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f5e18d8 View commit details
    Browse the repository at this point in the history