summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorDennis Sweeney <36520290+sweeneyde@users.noreply.github.com>2022-05-27 10:17:59 (GMT)
committerGitHub <noreply@github.com>2022-05-27 10:17:59 (GMT)
commitddc4a782d3f32efbc03c69ddd59b6fa10911bcd9 (patch)
tree488f01a69d0046c1d54259585545e6123d8c0274 /Python
parent5e34b494a08015e9b5a3deade23943bdba284a93 (diff)
downloadcpython-ddc4a782d3f32efbc03c69ddd59b6fa10911bcd9.zip
cpython-ddc4a782d3f32efbc03c69ddd59b6fa10911bcd9.tar.gz
cpython-ddc4a782d3f32efbc03c69ddd59b6fa10911bcd9.tar.bz2
gh-93223: More aggressive Jump-To-Jump elimination (GH-93229)
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index a4738c1..d8f859e 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;