Module Map
runmat-vm owns RunMat bytecode compilation, interpreter execution, runtime semantics, and acceleration integration.
Top-level layout
src/
accel/
bytecode/
call/
compiler/
indexing/
interpreter/
object/
ops/
runtime/
Ownership
bytecode/
- Bytecode contracts and compile entrypoints.
- Owns
Instr,EndExpr,Bytecode,UserFunction,ExecutionContext, andcompile(...).
compiler/
- HIR-to-bytecode lowering.
core.rsholds compiler state and shared emit/error helpers.expressions.rs,statements.rs,lvalues.rs,functions.rs,classes.rs, andimports.rsown the main lowering concerns.end_expr.rsowns lowering-timeendexpression construction.
interpreter/
- Shared interpreter shell and dispatch.
runner.rsowns the interpreter entrypoints and main loop.engine.rsowns loop setup and execution prelude helpers.dispatch/owns grouped opcode routing.debug.rsowns interpreter debug tracing helpers.
runtime/
- Shared runtime state outside the main interpreter loop.
call_stack.rsowns call stack limits and error namespace.workspace.rsowns workspace snapshot/import/export plumbing.globals.rsowns global/persistent storage.gc.rsowns interpreter GC root registration.
ops/
- Concrete opcode-family semantics.
- Arithmetic, comparison, arrays, stack, cells, and control-flow execution helpers live here.
call/
- Call semantics shared by interpreter and lowering.
- Builtin dispatch, user-function preparation, closures,
feval, and output shaping.
indexing/
- MATLAB-compatible indexing read/write semantics.
- Selector normalization,
endresolution, linear indexing, slice gather, and slice scatter.
object/
- Object/class member semantics.
- Member reads/writes, static dispatch, method loading, and runtime class registration.
accel/
- Acceleration-specific compile/runtime support.
graph.rsandstack_layout.rshold fusion graph metadata.idioms/owns deterministic math-idiom detection/lowering and runtime execution hooks.fusion.rsowns fusion execution helpers.residency.rsowns GPU residency policy helpers.auto_promote.rsowns accel-aware argument/value promotion.