Skip to content

Commit

Permalink
Stitch to ENTER_EXECUTOR during projection
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtbucher committed Aug 8, 2024
1 parent 63b5207 commit 17a27d0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,14 +597,6 @@ translate_bytecode_to_trace(

DPRINTF(2, "%d: %s(%d)\n", target, _PyOpcode_OpName[opcode], oparg);

if (opcode == ENTER_EXECUTOR) {
assert(oparg < 256);
_PyExecutorObject *executor = code->co_executors->executors[oparg];
opcode = executor->vm_data.opcode;
DPRINTF(2, " * ENTER_EXECUTOR -> %s\n", _PyOpcode_OpName[opcode]);
oparg = executor->vm_data.oparg;
}

if (opcode == EXTENDED_ARG) {
instr++;
opcode = instr->op.code;
Expand All @@ -614,6 +606,10 @@ translate_bytecode_to_trace(
goto done;
}
}

if (opcode == ENTER_EXECUTOR) {
goto done;
}
assert(opcode != ENTER_EXECUTOR && opcode != EXTENDED_ARG);
RESERVE_RAW(2, "_CHECK_VALIDITY_AND_SET_IP");
ADD_TO_TRACE(_CHECK_VALIDITY_AND_SET_IP, 0, (uintptr_t)instr, target);
Expand Down

0 comments on commit 17a27d0

Please sign in to comment.