diff options
author | Guido van Rossum <guido@python.org> | 2023-07-13 12:14:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 12:14:51 -0700 |
commit | e6e0ea0113748db1e9fe675be6db9041cd5cce1f (patch) | |
tree | ea6e1d899151e58ec7b88a7e2e969470eb9ef042 /Python/ceval.c | |
parent | 2f3ee02c22c4b42bf6075a75104c3cfbb4eb4c86 (diff) | |
download | cpython-e6e0ea0113748db1e9fe675be6db9041cd5cce1f.tar.gz cpython-e6e0ea0113748db1e9fe675be6db9041cd5cce1f.zip |
gh-106701: Move the hand-written Tier 2 uops to bytecodes.c (#106702)
This moves EXIT_TRACE, SAVE_IP, JUMP_TO_TOP, and
_POP_JUMP_IF_{FALSE,TRUE} from ceval.c to bytecodes.c.
They are no less special than before, but this way
they are discoverable o the copy-and-patch tooling.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index de44085d732..d6c72fa3ff3 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2764,46 +2764,6 @@ _PyUopExecute(_PyExecutorObject *executor, _PyInterpreterFrame *frame, PyObject #define ENABLE_SPECIALIZATION 0 #include "executor_cases.c.h" - // NOTE: These pop-jumps move the uop pc, not the bytecode ip - case _POP_JUMP_IF_FALSE: - { - if (Py_IsFalse(stack_pointer[-1])) { - pc = oparg; - } - stack_pointer--; - break; - } - - case _POP_JUMP_IF_TRUE: - { - if (Py_IsTrue(stack_pointer[-1])) { - pc = oparg; - } - stack_pointer--; - break; - } - - case JUMP_TO_TOP: - { - pc = 0; - CHECK_EVAL_BREAKER(); - break; - } - - case SAVE_IP: - { - frame->prev_instr = ip_offset + oparg; - break; - } - - case EXIT_TRACE: - { - frame->prev_instr--; // Back up to just before destination - _PyFrame_SetStackPointer(frame, stack_pointer); - Py_DECREF(self); - return frame; - } - default: { fprintf(stderr, "Unknown uop %d, operand %" PRIu64 "\n", opcode, operand); |