From ddc4a782d3f32efbc03c69ddd59b6fa10911bcd9 Mon Sep 17 00:00:00 2001 From: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> Date: Fri, 27 May 2022 06:17:59 -0400 Subject: gh-93223: More aggressive Jump-To-Jump elimination (GH-93229) --- Python/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python') diff --git a/Python/compile.c b/Python/compile.c index a4738c1f48..d8f859e753 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -8706,7 +8706,7 @@ jump_thread(struct instr *inst, struct instr *target, int opcode) assert(is_jump(target)); // bpo-45773: If inst->i_target == target->i_target, then nothing actually // changes (and we fall into an infinite loop): - if (inst->i_lineno == target->i_lineno && + if ((inst->i_lineno == target->i_lineno || target->i_lineno == -1) && inst->i_target != target->i_target) { inst->i_target = target->i_target; -- cgit v1.2.1