Expand description
Deterministic register interpreter for verified production BamTS bytecode.
Persisted constants never carry runtime identity. This interpreter therefore
owns a slot heap for strings, bigints, objects, arrays, closures, private
names, regular expressions, and iterators, and exposes only
bamts_native::Value words at host boundaries. Bytecode heap slots use
segment 1; other segments remain host-owned.
The 36-op dynamic-computation ISA is executed locally: register-keyed
property access (with data properties, accessor descriptors, and private-name
identity), prototype chains, closures with explicit capture environments,
arguments arrays, this/arguments/new.target, globals, arrays with
spread, object spread, iterators (sync/async/keys) with the two-write
IteratorNext, and generator/async Suspend-resume. The Host trait owns
only external module and builtin operations (foreign calls/constructs,
foreign property access, import, export, and the suspension driver);
internal objects, arrays, functions, closures, prototypes, and private names
never leave the interpreter.
Structs§
- Callback
Exception - An exception reported by a microtask or timer callback.
- Execution
- A terminated execution and the entry activation’s observable state.
- Execution
Outcome - The observable result of a terminated execution.
- Limits
- Deterministic execution and allocation ceilings.
- Machine
- The production bytecode interpreter.
- Microtask
Drain - The result of one explicit microtask checkpoint.
- Native
Engine - The native semantic engine over a verified program.
- Runtime
Error - Runtime
Source - Source metadata attached to every machine failure.
- Script
Source - The exact source of one classic script. Source and resource name preserve UTF-16 code units verbatim, including unpaired surrogates.
- Timer
Error - An owned failure message produced by a
TimerProvider. - Timer
Run - The result of one explicit timer checkpoint. At most one callback runs.
- Timer
Wakeup - A single expired timer reported by a
TimerProvider.
Enums§
- Native
Error - A native-execution failure: a runtime error, an AOT/entry linkage error, or an unrecoverable native trap whose completion value carries a trap id.
- Runtime
Error Kind - Script
Compile Error - Why a host compiler refused a classic script.
- Throw
Origin
Traits§
- Compile
Provider - A host capability for compiling a classic script without observing machine state.
- Host
- External capabilities available to the JavaScript runtime.
- Timer
Provider - A host capability that schedules real time without observing machine state.
Functions§
- constant_
value - Converts constants that need no runtime identity to ABI values. Strings and
bigints are materialized by
LoadConstin the machine’s slot heap. - run
- run_
linked_ program - Runs a linked program’s entry through the native engine and returns its
observable outcome. This is the runtime side of the AOT
main:entriesis a compiledNativeEntryTable(an AOTLinkedProgramor a JIT program), and the returnedExecutionOutcomecarries buffered stdout and the exit code. It is always available and never feature-gated, so a downstream host crate can link against it without enabling the runtime’saot-mainfeature.