summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-07-17 19:12:33 (GMT)
committerGitHub <noreply@github.com>2023-07-17 19:12:33 (GMT)
commit8e9a1a032233f06ce0f1acdf5f983d614c8745a5 (patch)
treed9a31c1c33b6b363d12f5e258a169835dbf29cd6 /Python/ceval.c
parent7e96370a946a2ca0f2f25af4ce5b3b59f020721b (diff)
downloadcpython-8e9a1a032233f06ce0f1acdf5f983d614c8745a5.zip
cpython-8e9a1a032233f06ce0f1acdf5f983d614c8745a5.tar.gz
cpython-8e9a1a032233f06ce0f1acdf5f983d614c8745a5.tar.bz2
gh-106603: Make uop struct a triple (opcode, oparg, operand) (#106794)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index f13ba98..b56ddfb 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2747,17 +2747,18 @@ _PyUopExecute(_PyExecutorObject *executor, _PyInterpreterFrame *frame, PyObject
_Py_CODEUNIT *ip_offset = (_Py_CODEUNIT *)_PyFrame_GetCode(frame)->co_code_adaptive;
int pc = 0;
int opcode;
- uint64_t operand;
int oparg;
+ uint64_t operand;
for (;;) {
opcode = self->trace[pc].opcode;
+ oparg = self->trace[pc].oparg;
operand = self->trace[pc].operand;
- oparg = (int)operand;
DPRINTF(3,
- "%4d: uop %s, operand %" PRIu64 ", stack_level %d\n",
+ "%4d: uop %s, oparg %d, operand %" PRIu64 ", stack_level %d\n",
pc,
opcode < 256 ? _PyOpcode_OpName[opcode] : _PyOpcode_uop_name[opcode],
+ oparg,
operand,
(int)(stack_pointer - _PyFrame_Stackbase(frame)));
pc++;