Skip to main content

Module vm

Module vm 

Source

Re-exports§

pub use opcode::opcode_name;

Modules§

mir_vm
Phase 4 of #252 — MIR vertical slice for the VM. Re-exported so tests + future external consumers can reach classify_mir_program_coverage without making the full vm::compiler module public.
opcode
runtime

Structs§

CallFrame
Minimal call frame: 16 bytes of metadata, no closure/upvalue fields.
CodeStore
All compiled bytecode for a program.
FnChunk
A compiled function chunk — bytecode + metadata.
VM
The Aver bytecode virtual machine.
VmBuiltinProfile
VmFunctionProfile
VmOpcodeProfile
VmProfileReport
VmReturnStats

Enums§

VmError
VM runtime error.

Functions§

compile_program_with_loaded_modules
Compile using dependency modules that were already parsed off-disk (or out of a virtual filesystem). The browser playground uses this to run multi-file programs without any real fs access.
compile_program_with_mir_fallback
Phase 4b of #252: compile with MIR-first dispatch + HIR fallback. Per fn: if the fn’s body lowers cleanly to MIR and MIR-emit produces bytecode, use that chunk; otherwise fall back to the existing HIR walker. The fallback is deliberate — every fn that lands in MirVmUnsupported territory (Match / Try / TailCall / Construct / Record* / Project / List / Tuple / Map / InterpolatedStr / IndependentProduct / builtin callees / first-class fn values) keeps the well-tested HIR shape.
compile_program_with_modules
Compile a resolved program into bytecode.
register_service_types
Register builtin service record types (HttpResponse, HttpRequest, etc.) in the arena before compilation. These types are used by services but not declared in user code.