Expand description
The synchronous stack machine.
Validated programs reject impossible indexes and avoid per-instruction allocation.
VM closures and static calls stay inside one machine. Call frames and compact scalar slots avoid native callback recursion and boxed integer traffic on the hot path; closures are converted to shared runtime values only when they escape through the public value boundary.
Exceptions (milestone 3): every failure routes through
Machine::raise, which unwinds to the innermost covering try-table
entry. Catch dispatch and binding identity come from the shared
core::catch_matches/core::caught_error boundary, so thrown values
and runtime-error strings behave exactly as in the tree evaluator.
Modules§
- instrumentation
- Low-overhead, opt-in instrumentation for the production bytecode machine.
Structs§
Enums§
- VmOutcome
- Terminal state of a machine run. Suspension variants belong to the later async milestone; adding them does not change instruction dispatch, only the set of exit points.
Functions§
- execute_
program - Executes a validated program’s entry function.
- execute_
program_ with_ globals - Executes a program against a caller’s namespace registry: globals intern into it and resolve from it, with no env bridge, snapshot, or refresh (issue #223).