mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
GH-91409: Don't overwrite valid locations with NOP locations (GH-95067)
This commit is contained in:
parent
41e0585ffa
commit
742d4614e1
3 changed files with 44 additions and 1 deletions
|
@ -9278,7 +9278,10 @@ clean_basic_block(basicblock *bb) {
|
|||
/* or, if the next instruction has same line number or no line number */
|
||||
if (src < bb->b_iused - 1) {
|
||||
int next_lineno = bb->b_instr[src+1].i_loc.lineno;
|
||||
if (next_lineno < 0 || next_lineno == lineno) {
|
||||
if (next_lineno == lineno) {
|
||||
continue;
|
||||
}
|
||||
if (next_lineno < 0) {
|
||||
bb->b_instr[src+1].i_loc = bb->b_instr[src].i_loc;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue