Skip to content

Commit 403c2be

Browse files
authored
Improve codegen bytecode parity (#7541)
- Add CFG block splitting, jump threading, backward jump normalization - Add genexpr StopIteration wrapper - Add ConstantData::Slice and constant slice folding - Add duplicate_exits_without_lineno and Block: Clone - Add builtin(genexpr) optimization for tuple/list/set/all/any - Add compile_try_except_no_finally for try-except without finally - Add module_name_declared_global_in_nested_scope - Add constant tuple folding in try_fold_constant_expr - Add fstring literal-only optimization and empty literal elision - Fix duplicate_exits_without_lineno: splice new blocks into linked list
1 parent 5cc9eab commit 403c2be

File tree

9 files changed

+933
-152
lines changed

9 files changed

+933
-152
lines changed

Lib/test/test_monitoring.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,6 @@ def func2():
12611261
('instruction', 'func2', 46),
12621262
('line', 'get_events', 11)])
12631263

1264-
@unittest.expectedFailure # TODO: RUSTPYTHON; - instruction offsets differ from CPython
12651264
def test_try_except(self):
12661265

12671266
def func3():

Lib/test/test_scope.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,6 @@ def dec(self):
692692
self.assertEqual(c.dec(), 1)
693693
self.assertEqual(c.dec(), 0)
694694

695-
@unittest.expectedFailure # TODO: RUSTPYTHON; figure out how to communicate that `y = 9` should be stored as a global rather than a STORE_NAME, even when the `global y` is in a nested subscope
696695
def testGlobalInParallelNestedFunctions(self):
697696
# A symbol table bug leaked the global statement from one
698697
# function to other nested functions in the same block.

0 commit comments

Comments
 (0)