Skip to content

Commit 31ad7e0

Browse files
authored
GH-111520: Add back the operand local (GH-111813)
1 parent 36aab34 commit 31ad7e0

File tree

3 files changed

+24
-28
lines changed

3 files changed

+24
-28
lines changed

Python/ceval.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -992,19 +992,15 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
992992

993993
OPT_STAT_INC(traces_executed);
994994
_PyUOpInstruction *next_uop = current_executor->trace;
995-
#ifdef Py_DEBUG
996-
uint64_t operand; // Used by several DPRINTF() calls
997-
#endif
995+
uint64_t operand;
998996
#ifdef Py_STATS
999997
uint64_t trace_uop_execution_counter = 0;
1000998
#endif
1001999

10021000
for (;;) {
10031001
opcode = next_uop->opcode;
10041002
oparg = next_uop->oparg;
1005-
#ifdef Py_DEBUG
10061003
operand = next_uop->operand;
1007-
#endif
10081004
DPRINTF(3,
10091005
"%4d: uop %s, oparg %d, operand %" PRIu64 ", stack_level %d\n",
10101006
(int)(next_uop - current_executor->trace),

Python/executor_cases.c.h

+22-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/cases_generator/instructions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def write_body(
166166
f"{func}(&this_instr[{active.offset + 1}].cache);"
167167
)
168168
else:
169-
out.emit(f"{typ}{ceffect.name} = ({typ.strip()})next_uop[-1].operand;")
169+
out.emit(f"{typ}{ceffect.name} = ({typ.strip()})operand;")
170170

171171
# Write the body, substituting a goto for ERROR_IF() and other stuff
172172
assert dedent <= 0

0 commit comments

Comments
 (0)