mirror of
https://github.com/python/cpython.git
synced 2025-10-07 07:31:46 +00:00
gh-106603: Make uop struct a triple (opcode, oparg, operand) (#106794)
This commit is contained in:
parent
7e96370a94
commit
8e9a1a0322
9 changed files with 191 additions and 110 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue