Commit 1c39fdb
authored
Bytecode parity (RustPython#7536)
* Add CFG block splitting, jump threading, backward jump normalization, genexpr StopIteration wrapper
- split_blocks_at_jumps: split blocks at branch points so each has one exit
- jump_threading: thread jumps through single-jump blocks (flowgraph.c jump_thread)
- Backward conditional jump normalization: invert and create NOT_TAKEN+JUMP block
- Follow empty blocks in jump-to-return optimization (next_nonempty_block)
- Add PEP 479 StopIteration handler to compile_comprehension for generators
* Add ConstantData::Slice and constant slice folding
- Add Slice variant to ConstantData and BorrowedConstant
- Fold constant slices (x[:3], x[1:4]) into LOAD_CONST(slice(...))
- Marshal serialization/deserialization for Slice type
- Box::leak in borrow_obj_constant for PySlice roundtrip
* Add duplicate_exits_without_lineno (disabled) and Block: Clone
Prepare infrastructure for exit block duplication optimization.
Currently disabled pending stackdepth integration.
* Improve codegen bytecode parity1 parent 3706c53 commit 1c39fdb
File tree
4 files changed
+791
-216
lines changed- Lib/test
- crates
- codegen/src
- jit/tests
4 files changed
+791
-216
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
532 | | - | |
533 | 532 | | |
534 | 533 | | |
535 | 534 | | |
| |||
0 commit comments