Skip to content

Commit

Permalink
Replace ENTER_EXECUTOR with the original in trace projection
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Jul 7, 2023
1 parent 11038c5 commit 4e2b250
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,12 @@ translate_bytecode_to_trace(
opcode = instr->op.code;
oparg = (oparg << 8) | instr->op.arg;
}
if (opcode == ENTER_EXECUTOR) {
_PyExecutorObject *executor = (_PyExecutorObject *)code->co_executors->executors[oparg&255];
opcode = executor->vm_data.opcode;
DPRINTF(2, " * ENTER_EXECUTOR -> %s\n", _PyOpcode_OpName[opcode]);
oparg = (oparg & 0xffffff00) | executor->vm_data.oparg;
}
switch (opcode) {
default:
{
Expand Down

0 comments on commit 4e2b250

Please sign in to comment.