Skip to content

Commit d201c48

Browse files
authored
Bytecode parity - for-loop cleanup, return duplication, late jump threading fix (#7580)
- Use POP_TOP instead of POP_ITER for for-loop break/return cleanup - Expand duplicate_end_returns to clone final return for jump predecessors - Restrict late jump threading pass to unconditional jumps only - Skip exception blocks in inline/reorder passes - Simplify threaded_jump_instr NoInterrupt handling
1 parent 9cf7bcd commit d201c48

19 files changed

+1031
-263
lines changed

Lib/test/test_dis.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,6 @@ def test_disassemble_class(self):
11871187
def test_disassemble_instance_method(self):
11881188
self.do_disassembly_test(_C(1).__init__, dis_c_instance_method)
11891189

1190-
@unittest.expectedFailure # TODO: RUSTPYTHON
11911190
def test_disassemble_instance_method_bytes(self):
11921191
method_bytecode = _C(1).__init__.__code__.co_code
11931192
self.do_disassembly_test(method_bytecode, dis_c_instance_method_bytes)

Lib/test/test_yield_from.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,6 @@ def g():
882882
yield from ()
883883
self.assertRaises(StopIteration, next, g())
884884

885-
@unittest.expectedFailure # TODO: RUSTPYTHON
886885
def test_delegating_generators_claim_to_be_running(self):
887886
# Check with basic iteration
888887
def one():
@@ -909,7 +908,6 @@ def two():
909908
pass
910909
self.assertEqual(res, [0, 1, 2, 3])
911910

912-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: Lists differ: [0, 1, 2] != [0, 1, 2, 3]
913911
def test_delegating_generators_claim_to_be_running_with_throw(self):
914912
# Check with throw
915913
class MyErr(Exception):

0 commit comments

Comments
 (0)