Skip to content

Commit 553b04a

Browse files
committed
Bytecode parity - folding, class prologue, except cleanup
Constant folding: - Add string/bytes multiply and bytes concat folding in IR - Add constant subscript folding (str, bytes, tuple indexing) - Delegate list/set constant folding to IR passes - Stream big non-const list/set via BUILD+LIST_APPEND Class/generic compilation: - Reorder class body prologue: __type_params__ before __classdict__ - Build class function before .generic_base in generic classes - Register .type_params/.generic_base symbols in proper scopes - Use load_name/store_name helpers for synthetic variables Return block handling: - Only duplicate return-None epilogues, not arbitrary returns - Add inline_pop_except_return_blocks pass - Add duplicate_named_except_cleanup_returns pass Other fixes: - Fix eliminate_dead_stores to only collapse adjacent duplicates - Skip STORE_FAST_LOAD_FAST superinstruction in generators after FOR_ITER - Thread jumps through NOP-only blocks - Transfer NOP line info to following unconditional jumps - Extract scope_needs_conditional_annotations_cell helper - Register __conditional_annotations__ for module future annotations
1 parent c79baa3 commit 553b04a

3 files changed

Lines changed: 575 additions & 136 deletions

File tree

0 commit comments

Comments
 (0)