Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7baa5df
Python 3.11 decompilation fixes
goromachine Jun 4, 2026
717b3d7
Fix SWAP_A as a real stack swap (chained comparisons, starred unpack)
goromachine Jun 5, 2026
b5bbd70
Render 'raise X from Y' for Python 3 (was Python-2 'raise X, Y')
goromachine Jun 5, 2026
27cc6c2
Reconstruct 'except ... as e' for Python 3.11 + dict/set comprehensio…
goromachine Jun 5, 2026
2f0e618
Reconstruct Python 3.11 with-statement (common mid-block shape)
goromachine Jun 5, 2026
90c6906
Reconstruct Python 3.11 try/finally
goromachine Jun 5, 2026
3cea1b7
Fix function signature parameter order (*args before keyword-only)
goromachine Jun 5, 2026
0c79dbf
Inline Python 3.11 generator expressions
goromachine Jun 5, 2026
4260d90
Reconstruct class keyword arguments (metaclass=) for Python 3.11
goromachine Jun 7, 2026
2222d2b
Inline filtered list comprehensions
goromachine Jun 7, 2026
efb56a0
Inline comprehensions/genexprs with multiple (nested) filters
goromachine Jun 8, 2026
aabdba9
Close with/finally blocks before processing exception-table entries
goromachine Jun 8, 2026
63eee37
Fix multiple except-clause boundary (clause that raises / at function…
goromachine Jun 8, 2026
9a83ef3
Strip spurious module-level returns from all nested blocks
goromachine Jun 8, 2026
761ba7c
Strip any spurious module-level return (not just 'return None')
goromachine Jun 8, 2026
ba35489
Fix std::bad_cast crash on return-in-if followed by comprehension
goromachine Jun 8, 2026
96a672e
Fix for-loop not closing in 3.11 (return/code after loop absorbed int…
goromachine Jun 8, 2026
7a0109a
Fix except-as-e handler after return-in-if inside try
goromachine Jun 8, 2026
9c5ea2f
Reconstruct 3.11 while-loops (bottom-test optimization)
goromachine Jun 8, 2026
8b9283f
Emit continue for backward jump out of else into enclosing loop
goromachine Jun 8, 2026
c1ef0fe
Don't reopen a try for split exception-table regions (nested try)
goromachine Jun 8, 2026
0418735
Reconstruct 3.11 chained comparisons (a == b == c)
goromachine Jun 8, 2026
58a1777
Only skip an actual jump after a return inside an if/else
goromachine Jun 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ASTNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,16 @@ class ASTCall : public ASTNode {
void setVar(PycRef<ASTNode> var) { m_var = std::move(var); }
void setKW(PycRef<ASTNode> kw) { m_kw = std::move(kw); }

bool isDecorator() const { return m_isDecorator; }
void setDecorator(bool d) { m_isDecorator = d; }

private:
PycRef<ASTNode> m_func;
pparam_t m_pparams;
kwparam_t m_kwparams;
PycRef<ASTNode> m_var;
PycRef<ASTNode> m_kw;
bool m_isDecorator = false;
};


Expand Down Expand Up @@ -578,9 +582,14 @@ class ASTCondBlock : public ASTBlock {
PycRef<ASTNode> cond() const { return m_cond; }
bool negative() const { return m_negative; }

/* For BLK_EXCEPT: optional `as <var>` exception binding (Python 3.11+). */
PycRef<ASTNode> exceptVar() const { return m_exceptVar; }
void setExceptVar(PycRef<ASTNode> v) { m_exceptVar = std::move(v); }

private:
PycRef<ASTNode> m_cond;
bool m_negative;
PycRef<ASTNode> m_exceptVar;
};


Expand All @@ -598,6 +607,7 @@ class ASTIterBlock : public ASTBlock {
void setIndex(PycRef<ASTNode> idx) { m_idx = std::move(idx); init(); }
void setCondition(PycRef<ASTNode> cond) { m_cond = std::move(cond); }
void setComprehension(bool comp) { m_comp = comp; }
void setIter(PycRef<ASTNode> it) { m_iter = std::move(it); }

private:
PycRef<ASTNode> m_iter;
Expand Down
Loading