Compile VarRef-free query patterns#64
Open
MesTTo wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a compiled matcher path for query patterns that contain no
VarRef.The compiler lowers each pattern factor into preorder
MatchOps andquery_multi_rawexecutes that program directly. Patterns with query-sideVarRefstill use the existingcoreferential_transitioninterpreter.This branch also adds focused tests for the compiler boundary and a public
query_multismoke test over real inserted atoms.Reviewer Note
This is the small stage-1 matcher precompile. Later local compiled-matcher commits for query-side
VarRefand compound captures are not included because they depend on broader matcher changes.Local notes measured
process_calculusat 26.1s to 25.6s. This branch should be reviewed as a narrow matcher slice, not the larger set-at-a-time emit work.Validation
RUSTFLAGS='-C target-cpu=native' cargo +nightly-2026-06-01 test -p mork --lib compile_match_program -- --nocaptureRUSTFLAGS='-C target-cpu=native' cargo +nightly-2026-06-01 test -p mork --lib query_multi_matches_varref_free_pattern_with_compiled_program -- --nocaptureRUSTFLAGS='-C target-cpu=native' cargo +nightly-2026-06-01 test -p mork --libjscpd --reporters console --format rust --min-lines 8 --min-tokens 80 kernel/src/space.rsgit diff --check