Skip to content

Conversation

@zharinov
Copy link
Member

Summary

  • New optimization pass: merge structurally identical successor instructions into one with combined successors
  • Fix collapse_up to count predecessors before removing shared labels

Why

Patterns like [(object (pair)) (object (string))] generate duplicate (object) instructions that differ only in successors. This pass merges them, reducing instruction count.

Notes

Not a frequent optimization trigger, but reduces bytecode size when it applies.

@zharinov zharinov enabled auto-merge (squash) January 15, 2026 19:50
Merge structurally identical successor instructions into one with combined
successors. Reduces instruction count for patterns like `[(object ...) (object ...)]`.

Also fixes collapse_up to count predecessors before removing shared labels.
@zharinov zharinov force-pushed the feat/prefix-collapse branch from 58e6926 to 3d17552 Compare January 15, 2026 19:58
@zharinov zharinov merged commit 075ff3c into master Jan 15, 2026
3 checks passed
@zharinov zharinov deleted the feat/prefix-collapse branch January 15, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants