Remove custom ARM64 JIT backend#158
Merged
Merged
Conversation
The custom JIT was Apple-Silicon-only, hand-rolled AArch64 codegen, supported only ~12 numeric opcodes, had no CI coverage, and every dispatch fix (PRs #150 and #154) had to be mirrored into it separately. Through the manifesto lens it was pure maintenance burden with no agent-token benefit. Cranelift JIT covers everything the arm64 backend did and more, faster. Removes the src/vm/jit_arm64.rs module (627 lines), the pub mod declaration, the --run-jit CLI flag, the Engine::Jit enum variant, the run_jit_engine dispatch arm, the manual --run-jit arg parser entry, the help-text line, the arm64 bench code paths in run_bench including the "Custom JIT (arm64)" comparison output, and 13 run_jit: false defaults from struct literals in unit tests. Gates jit_args and all_numeric in run_bench behind #[cfg(feature = "llvm")] since LLVM is now their only consumer. Breaking change: --run-jit is no longer a known flag. Acceptable for a 0.x language; users wanting JIT compilation should use --run-cranelift (the default JIT) which is faster and supports the full opcode set.
Removes the 19 run_jit_arm64_* tests in eval_inline.rs that exercised the now-deleted custom JIT path, plus the two run_jit_* tests in cli_integration.rs that asserted on the flag's error behaviour. The cases that tested arithmetic correctness are already covered by the Cranelift and VM engines via the parallel test variants in the same files. Also simplifies two bench helpers that pattern-matched on "Custom JIT" output, leaving them checking only "Cranelift JIT".
The jit engine is no longer iterated in the example harness, so the -- engine-skip: jit directives in 11 example files were silent no-ops. Removed them (deleting the line entirely where jit was the only entry, narrowing where vm was also listed). Also dropped the unreachable engine.name == "jit" branch in tests/examples_engines.rs that handled the "not eligible" error the custom JIT used to emit.
The row's string, record, file, and api columns held real numbers which the custom ARM64 JIT physically cannot produce (it supported only numeric opcodes). The figures were Cranelift's, mislabeled. Relabel rather than remove so the row continues to carry the JIT-tier perf comparison readers expect.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Removes the custom ARM64 JIT (
--run-jit) from ilo-lang. Keeps Cranelift JIT (--run-cranelift), register VM (--run-vm), and tree-walker (--run-tree).The custom JIT was Apple-Silicon-only, hand-rolled AArch64 codegen, supported only ~12 numeric opcodes, had no CI coverage, and every dispatch fix (PRs #150 and #154 both) had to be mirrored into it separately. Through the manifesto lens it was pure maintenance burden with no agent-token benefit: it doesn't reduce tokens for any agent program (Cranelift handles the same opcodes and more, faster), it just multiplies our surface area for future fixes.
~1,148 net lines removed across 8 files, with no functional regression for any program ilo can run.
What's in the diff
vm: remove custom ARM64 JIT backend— deletessrc/vm/jit_arm64.rs(627 lines) and thepub moddeclaration; strips--run-jitfrom the CLI surface (Cli::args,Engine::Jit, dispatch arm, manual arg parser, help text); removes the arm64 bench code paths inrun_bench; drops 13run_jit: falsedefaults from unit-test struct literals. Gatesjit_args/all_numericbehind#[cfg(feature = "llvm")]since LLVM is their only remaining consumer.tests: drop ARM64 JIT-specific cases— removes the 19run_jit_arm64_*tests intests/eval_inline.rsand 2run_jit_*tests intests/cli_integration.rs. Their arithmetic-correctness coverage is already provided by the parallel Cranelift and VM test variants in the same files.examples + test harness: remove engine-skip jit references— drops-- engine-skip: jitdirectives from 11 example files (now silent no-ops since thejitengine name is no longer iterated) and removes the unreachableengine.name == "jit"branch fromtests/examples_engines.rs.docs: relabel ilo JIT row to Cranelift in perf table— the row's string/record/file/api columns held real numbers the custom JIT cannot produce, so the figures were Cranelift's, mislabeled. Relabel rather than remove so the row continues to carry the JIT-tier perf comparison readers expect.Breaking change
--run-jitis no longer a known flag. Acceptable for a 0.x language. Users wanting JIT compilation should use--run-cranelift(the default JIT engine), which is faster and supports the full opcode set.Test plan
cargo test --release --features cranelift— full suite greencargo fmt --all -- --checkcleancargo clippy --all-targets -- -D warningsclean (default features)cargo clippy --all-targets --features cranelift -- -D warningsclean--run-tree,--run-vm,--run-craneliftall return correct output forf x:n>n;*x 2with arg5--run-jitis no longer accepted (returns arity error via trailing-var-arg, same behaviour as any unknown flag in that position)all_numericcfg-gating, stale engine-skip cleanup)Why now
Two recent PRs (#150 slc/mset, #154 friendly errors) each had to mirror dispatch changes into three engines: VM, Cranelift, and the custom ARM64 JIT. The custom JIT was the highest-friction surface and the lowest-leverage backend. Removing it makes every future ilo-lang fix smaller.