summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index da11355..866acd2 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2751,7 +2751,8 @@ _PyUopExecute(_PyExecutorObject *executor, _PyInterpreterFrame *frame, PyObject
operand = self->trace[pc].operand;
oparg = (int)operand;
DPRINTF(3,
- " uop %s, operand %" PRIu64 ", stack_level %d\n",
+ "%4d: uop %s, operand %" PRIu64 ", stack_level %d\n",
+ pc,
opcode < 256 ? _PyOpcode_OpName[opcode] : _PyOpcode_uop_name[opcode],
operand,
(int)(stack_pointer - _PyFrame_Stackbase(frame)));
@@ -2763,6 +2764,25 @@ _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 SAVE_IP:
{
frame->prev_instr = ip_offset + oparg;