We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d95157 commit d90ecafCopy full SHA for d90ecaf
Python/optimizer.c
@@ -684,6 +684,14 @@ translate_bytecode_to_trace(
684
ADD_TO_TRACE(SAVE_IP, 0, 0);
685
goto done;
686
}
687
+ if (new_code->co_version != func_version) {
688
+ // func.__code__ was updated.
689
+ // Perhaps it may happen again, so don't bother tracing.
690
+ // TODO: Reason about this -- is it better to bail or not?
691
+ DPRINTF(2, "Bailing because co_version != func_version\n");
692
+ ADD_TO_TRACE(SAVE_IP, 0, 0);
693
+ goto done;
694
+ }
695
// Increment IP to the return address
696
instr += _PyOpcode_Caches[_PyOpcode_Deopt[opcode]] + 1;
697
TRACE_STACK_PUSH();
0 commit comments