mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
bpo-46724: Use JUMP_ABSOLUTE
for all backward jumps. (GH-31326)
* Make sure all backward jumps use JUMP_ABSOLUTE. * Add news. * Fix up news item. * Make test use consistent style.
This commit is contained in:
parent
12360aa159
commit
3be1a443ca
3 changed files with 17 additions and 0 deletions
|
@ -7534,6 +7534,11 @@ normalize_jumps(struct assembler *a)
|
|||
last->i_opcode = JUMP_FORWARD;
|
||||
}
|
||||
}
|
||||
if (last->i_opcode == JUMP_FORWARD) {
|
||||
if (last->i_target->b_visited == 1) {
|
||||
last->i_opcode = JUMP_ABSOLUTE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue