Visitar URL original
Bytecode parity by youknowone · Pull Request #7541 · RustPython/RustPython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Improve codegen bytecode parity
- 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
  • Loading branch information
youknowone committed Mar 31, 2026
commit ca6e56ae3a36b7362fd23586d1e6c7a59b918ef1
1 change: 0 additions & 1 deletion Lib/test/test_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,6 @@ def func2():
('instruction', 'func2', 46),
('line', 'get_events', 11)])

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

def func3():
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@ def dec(self):
self.assertEqual(c.dec(), 1)
self.assertEqual(c.dec(), 0)

@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
def testGlobalInParallelNestedFunctions(self):
# A symbol table bug leaked the global statement from one
# function to other nested functions in the same block.
Expand Down
Loading
Loading