Skip to content

fix(interpreter): optimize file execution ⚡ - #221

Merged
timfennis merged 1 commit into
masterfrom
bugfix/optimize-file-execution
Sep 8, 2026
Merged

timfennis merged 1 commit into
masterfrom
bugfix/optimize-file-execution

Conversation

@timfennis

Copy link
Copy Markdown
Owner

Normal ndc script.ndc execution used the resumable compiler path, which disables peephole optimization. File execution now uses a one-shot interpreter backed by Compiler::compile, so complete programs are optimized while REPL evaluation continues to retain compiler and VM state between inputs.

The one-shot path also restores analyzer state after each execution, and regression tests verify both optimizer use and declaration isolation.

Validation:

  • cargo test --workspace
  • cargo clippy --workspace --all-targets
  • cargo build --no-default-features
  • cargo fmt --all -- --check

AI disclosure: Codex (GPT-6) assisted with investigation, implementation, regression tests, validation, and PR drafting.

@timfennis
timfennis merged commit bf10862 into master Sep 8, 2026
1 check passed
@timfennis
timfennis deleted the bugfix/optimize-file-execution branch September 8, 2026 13:26
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