Expand description
Program representation for the experimental bytecode VM.
Constants reuse core::Value directly: the VM does not duplicate the
Hara value model. The versioned vm::artifact codec persists validated
programs for packaging and browser startup without reparsing source.
Structs§
- Catch
Entry - One
catchclause of aTryEntry: the machine stores the caught value intobindingand jumps totargetwhenclassmatches. - Function
Prototype - A compiled function. The entry function has arity and capture count 0;
fn/defnforms contribute the remaining prototypes. - Program
- A compiled program: a constant pool plus function prototypes.
- TryEntry
- A static handler table entry: the protected range
[start, end)and its catch/finally regions. Registered outermost-first, so the machine’s reverse-order search finds the innermost covering entry.
Constants§
- MAX_
CAPTURES - Maximum number of captured values in one closure (
u8operand). - MAX_
CONSTANTS - Maximum number of entries in the constant pool.
- MAX_
INSTRUCTIONS - Maximum number of instructions per function prototype.
- MAX_
LOCALS - Maximum number of local slots per frame (inherent to the
u16operands). - MAX_
OPERAND_ STACK - Maximum computed operand-stack depth for any function.
- MAX_
PRIMITIVE_ ARGUMENTS - Maximum number of arguments in one primitive call (
u8operand).
Type Aliases§
- Function
Id - Index of a function prototype inside
Program::functions.