Skip to content

Commit 80b9b3a

Browse files
authored
gh-104584: Replace ENTER_EXECUTOR with the original in trace projection (#106526)
1 parent a855458 commit 80b9b3a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Python/optimizer.c

+6
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,12 @@ translate_bytecode_to_trace(
419419
opcode = instr->op.code;
420420
oparg = (oparg << 8) | instr->op.arg;
421421
}
422+
if (opcode == ENTER_EXECUTOR) {
423+
_PyExecutorObject *executor = (_PyExecutorObject *)code->co_executors->executors[oparg&255];
424+
opcode = executor->vm_data.opcode;
425+
DPRINTF(2, " * ENTER_EXECUTOR -> %s\n", _PyOpcode_OpName[opcode]);
426+
oparg = (oparg & 0xffffff00) | executor->vm_data.oparg;
427+
}
422428
switch (opcode) {
423429
default:
424430
{

0 commit comments

Comments
 (0)