Skip to content

Commit f4027de

Browse files
committed
Don't try to optimize with default optimizer
1 parent ea21cbf commit f4027de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Python/ceval.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,8 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
11101110
int pc = next_uop - 1 - current_executor->trace;
11111111
uintptr_t *pcounter = current_executor->extra + pc;
11121112
*pcounter += 1;
1113-
if (*pcounter == 16 &&
1113+
if (*pcounter == 16 && // TODO: use resume_threshold
1114+
tstate->interp->optimizer != &_PyOptimizer_Default &&
11141115
(opcode == POP_JUMP_IF_FALSE ||
11151116
opcode == POP_JUMP_IF_TRUE ||
11161117
opcode == POP_JUMP_IF_NONE ||

0 commit comments

Comments
 (0)