Skip to content

♻️ refactor(mq-lang): clean up tarn VM compiler error messages and dead_code - #2305

Merged
harehare merged 1 commit into
mainfrom
refactor/tarn-compiler-cleanup
Sep 8, 2026
Merged

♻️ refactor(mq-lang): clean up tarn VM compiler error messages and dead_code#2305
harehare merged 1 commit into
mainfrom
refactor/tarn-compiler-cleanup

Conversation

@harehare

@harehare harehare commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

Drop the leftover "vm M2 subset" wording from CompileError's Display, remove the never-constructed UnsupportedExpr variant, and replace allow(dead_code) workarounds with #[cfg(test)] on helpers only used by tests (compile_program, compile_program_with_builtin_prelude, compile_and_run, compile_and_run_full, interpreter::run). Also drop a stale dead_code annotation on VmError::token_id, which is actually used in production via vm_error_to_runtime_error.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • ⚡ Performance
  • ✅ Test
  • 📦 Build / dependencies
  • 👷 CI

Checklist

  • I ran cargo fmt and cargo clippy and addressed any warnings
  • I ran just test-all and all tests pass
  • I added or updated tests covering this change
  • I updated relevant documentation (/docs, crate README.md) if needed
  • I added a changelog entry if this is a user-facing change

Additional Context

…ad_code

Drop the leftover "vm M2 subset" wording from CompileError's Display,
remove the never-constructed UnsupportedExpr variant, and replace
allow(dead_code) workarounds with #[cfg(test)] on helpers only used by
tests (compile_program, compile_program_with_builtin_prelude,
compile_and_run, compile_and_run_full, interpreter::run). Also drop a
stale dead_code annotation on VmError::token_id, which is actually used
in production via vm_error_to_runtime_error.

Also extract the three destructuring-pattern fields on Compiler
(or_pattern_slots, pending_pattern_overrides, current_pattern_override)
into a PatternState substruct to shrink the struct.
@codspeed-hq

codspeed-hq Bot commented Sep 8, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 51 untouched benchmarks


Comparing refactor/tarn-compiler-cleanup (5d3b99d) with main (9b721d5)

Open in CodSpeed

@harehare
harehare merged commit 483d73d into main Sep 8, 2026
12 checks passed
@harehare
harehare deleted the refactor/tarn-compiler-cleanup branch September 8, 2026 12:30
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