Skip to content

Conversation

@zharinov
Copy link
Member

Summary

  • Move bytecode constraint handling from IR generation (scope.rs) to dedicated lower.rs pass
  • Fix panics for post_effects > 7 and neg_fields > 7 by adding cascade logic
  • Simplify emit_epsilon and rename emit_match_with_cascadeemit_match

Why

Clean separation of concerns: IR is now unconstrained during generation and optimization passes. Bytecode encoding limits (3-bit effect counts, 5-bit successor counts) are handled in the final lowering pass before layout.

This enables future IR optimizations (like branch prefix stealing) without premature bytecode constraints.

@zharinov zharinov merged commit 88961de into master Jan 15, 2026
3 checks passed
@zharinov zharinov deleted the refactor/lower-pass branch January 15, 2026 18:40
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