Background
Right now the execution model is framed as having interpret on one end and jit on the other. That skips over two useful intermediate levels that would make the runtime architecture easier to reason about and evolve.
Proposal
Add two explicit intermediate execution levels:
-
bytecode
- A lowered, executable representation below the high-level interpreter path.
- Gives us a concrete runtime boundary and a stable target for execution, tracing, dumping, and oracle-style comparisons.
-
template-based-jit
- A JIT tier with no optimizing backend at all.
- Emits machine code from templates or direct codegen patterns, without depending on Cranelift/LLVM-style optimization machinery.
- Lets us separate "native dispatch/code emission works" from "an optimizing backend can handle this program".
Why
This gives the execution ladder more useful shape:
interpret -> bytecode -> template-based-jit -> jit
The distinction should help keep observability and fallback behavior honest:
interpret stays the semantic reference path.
bytecode becomes the explicit lowered execution format.
template-based-jit proves the native-code path without involving an optimizing backend.
jit remains the optimizing backend tier.
That should also make JIT coverage reporting more precise: failures in lowering to bytecode, failures in template emission, and failures in the optimizing backend are different classes of problem and should be visible as such.
Background
Right now the execution model is framed as having
interpreton one end andjiton the other. That skips over two useful intermediate levels that would make the runtime architecture easier to reason about and evolve.Proposal
Add two explicit intermediate execution levels:
bytecodetemplate-based-jitWhy
This gives the execution ladder more useful shape:
The distinction should help keep observability and fallback behavior honest:
interpretstays the semantic reference path.bytecodebecomes the explicit lowered execution format.template-based-jitproves the native-code path without involving an optimizing backend.jitremains the optimizing backend tier.That should also make JIT coverage reporting more precise: failures in lowering to bytecode, failures in template emission, and failures in the optimizing backend are different classes of problem and should be visible as such.