mirror of
https://github.com/zrax/pycdc.git
synced 2026-06-23 11:34:07 +00:00
In 3.11 a return inside an if/else may fall straight into a sibling branch. The old code unconditionally consumed the next instruction to skip a redundant jump; when that instruction was the LOAD_CONST of a code object feeding a MAKE_FUNCTION (e.g. a list comprehension after 'if not x: return []'), dropping it left MAKE_FUNCTION without its operand and crashed with std::bad_cast. Now peek the next instruction and keep it only when it is a LOAD_CONST of a code object; otherwise preserve the original skip behavior. Added PycBuffer::pos()/setPos() for safe peeking. decompilation target: 234/239 files, corpus 40/95 (+1, 0 regressions). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| build.make | ||
| cmake_clean.cmake | ||
| compiler_depend.make | ||
| compiler_depend.ts | ||
| DependInfo.cmake | ||
| progress.make | ||