Skip to content

refactor: split compile.rs and simplify bytecode IR - #202

Merged
zharinov merged 1 commit into
masterfrom
refactor/compile-split
Jan 1, 2026
Merged

refactor: split compile.rs and simplify bytecode IR#202
zharinov merged 1 commit into
masterfrom
refactor/compile-split

Conversation

@zharinov

@zharinov zharinov commented Jan 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Split query/compile.rs (1323 lines) into 7 focused modules:

    • mod.rs - compiler orchestration
    • capture.rs - capture effect emission
    • expressions.rs - node/field compilation
    • navigation.rs - anchor navigation modes
    • quantifier.rs - *, +, ? handling
    • scope.rs - struct/array scope management
    • sequences.rs - sequence and alternation compilation
  • Simplify bytecode IR:

    • Remove unused ref_id from CallIR/ReturnIR
    • Add nav and node_field to CallIR for proper field constraint handling
    • Rename effect opcodes for clarity (AArr, SObj, EEnum)
  • Improve dump format with better column alignment

Test plan

  • cargo test -p plotnik-lib passes (660 tests)
  • CI passes

@zharinov
zharinov enabled auto-merge (squash) January 1, 2026 15:17
@zharinov
zharinov force-pushed the refactor/compile-split branch from 77bb45f to 2ebc8f3 Compare January 1, 2026 15:20
@zharinov
zharinov merged commit 659e158 into master Jan 1, 2026
4 checks passed
@zharinov
zharinov deleted the refactor/compile-split branch January 1, 2026 15:21
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.

1 participant