elif instr.opname in HANDLED_JUMPS:
self.assertNotEqual(instr.arg, (line + 1)*INSTR_SIZE)
+ def test_no_wraparound_jump(self):
+ # See https://bugs.python.org/issue46724
+
+ def while_not_chained(a, b, c):
+ while not (a < b < c):
+ pass
+
+ for instr in dis.Bytecode(while_not_chained):
+ self.assertNotEqual(instr.opname, "EXTENDED_ARG")
+
@requires_debug_ranges()
class TestSourcePositions(unittest.TestCase):
# Ensure that compiled code snippets have correct line and column numbers
last->i_opcode = JUMP_FORWARD;
}
}
+ if (last->i_opcode == JUMP_FORWARD) {
+ if (last->i_target->b_visited == 1) {
+ last->i_opcode = JUMP_ABSOLUTE;
+ }
+ }
}
}