mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-93223: More aggressive Jump-To-Jump elimination (GH-93229)
This commit is contained in:
parent
5e34b494a0
commit
ddc4a782d3
4 changed files with 105 additions and 98 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue