mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
* Align codegen CFG cleanup with CPython * Align codegen bytecode with CPython 3.14 * Remove remove_jump_target_line_nops The pass dropped a same-line NOP at the start of any jump-targeted block whose body advanced to a later line, but CPython's basicblock_remove_redundant_nops only consults the previous/next instruction inside the same block. The extra pass deleted the else-body line trace anchor exercised by test_nested_double_async_with. Ignore test_conditional_break_finally_does_not_keep_break_cleanup_nop; the break NOP lands in a separate block from the inlined finally body, so same-line successor elision does not apply here. * Keep except_handler blocks reachable in eliminate_unreachable_blocks After convert_pseudo_ops lowers SETUP_FINALLY to a plain NOP, the only remaining link from the try body to the except_handler block was the per-instruction except_handler annotation. When earlier passes had already removed every NOP that carried that annotation (e.g. an empty try body with `pass`), the handler block became unreachable from the entry block and its instructions were cleared, dropping the handler entirely. Seed reachability with blocks already marked except_handler so handler dispatch survives independent of the in-block annotation. Also drop two expectedFailure markers in test_patma whose match-tracing expectations now pass. * Align bytecode CFG cleanup with CPython