Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7e7e111 to
a15185e
Compare
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] test: cpython/Lib/test/test_compile.py (TODO: 27) dependencies: dependent tests: (no tests depend on compile) Legend:
|
11ad6f4 to
876791a
Compare
- ExceptionStack: init with base slot instead of empty vec - with_frame_impl: save/restore exc_info value instead of push/pop slot, so callees see caller's handled exception - Remove unused with_frame_exc - resume_gen_frame: use push_exception/pop_exception methods - codegen: move RERAISE inside cleanup handler's exception table range in finally blocks (both try-finally and try-except-finally), so POP_EXCEPT runs before re-raising
- Add eliminate_dead_stores pass before peephole_optimize: consecutive STORE_FAST to the same variable are replaced with POP_TOP (apply_static_swaps from CPython flowgraph.c) - Remove 3 expectedFailure decorators in test_peepholer (test_load_fast_unknown_* now pass) - Accept updated async_with snapshot - Fix formatting in ir.rs, mod.rs, Python scripts
876791a to
8b264e5
Compare
RERAISE was popping `depth` extra values in addition to the exception, causing stack underflow when unwinding through the exception table. CPython spec: `inst(RERAISE, (values[oparg], exc -- values[oparg]))` — only `exc` is consumed, `values[oparg]` stays on the stack so the outer handler's exception-table unwind pops them down to its configured depth. Without this fix, `async with` cleanup paths with nested exception handlers crashed with `pop stackref but null found` at POP_EXCEPT.
- Add optimize_build_tuple_unpack (flowgraph.c): BUILD_TUPLE n + UNPACK_SEQUENCE n → NOP for n=1, or NOP + SWAP n for n=2/3. - Add apply_static_swaps (flowgraph.c): eliminates SWAP by swapping target STORE_FAST/POP_TOP instructions in place. Checks line boundaries and detects store conflicts before reordering. - Remove direct_name_unpack fast path from compile.rs. The general UNPACK path now produces the same bytecode via the new flowgraph optimizations. - Drop expectedFailure on test_pack_unpack (now passes).
No description provided.