mirror of
https://github.com/zrax/pycdc.git
synced 2026-06-23 11:34:07 +00:00
Two combined fixes for the 'return inside if inside try / except as e' pattern: 1. The return-in-if skip logic could consume the PUSH_EXC_INFO that immediately follows a return inside an if within a try. Dropping it left the handler without its exception sentinel, so the 'as e' binding captured a garbage stack value and the handler was mis-nested as a statement in the try body. Never skip PUSH_EXC_INFO. 2. Suppress the compiler cleanup 'e = None' when the store value is an explicit None constant (LOAD_CONST None; STORE), not only the NULL placeholder form. With the binding now correct, this removes the spurious 'e = None; del e' tail. decompilation target: 236/239 files, corpus 41/95 (+1: utilities; 0 regressions). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 MiB
2 MiB