Expand description
Decode IR vm-ops JSON into ledger Op<ResultModeGather, InMemoryDB>.
Each vm-op JSON object is one VM instruction the on-chain runtime
consumes (push, idx, addi, ins, …). The IR emitter
pre-expands the recipe so consumers see concrete ops, but argument
values can still reference runtime-evaluated expressions via
{"vm": "ref", "type": <descriptor>, "value": <expression>}. The
decoder resolves those refs against the current scope before
constructing the typed Op.
Structs§
- Compiled
Ledger Query - Pre-compiled ledger VM query for a
vm-opsinstruction list, paired with conservative staticQueryFlagsfor lazy context/effects/state handling. - Eval
Scope - Evaluation scope passed to the vm-op decoder so
vm: refrefs can resolve to concrete values. - Query
Flags - Static summary of which VM stack slots a ledger query may touch.
Enums§
- Compiled
Aligned Value - Compiled
IntArg - Compiled
Op - One pre-compiled VM instruction inside a
CompiledLedgerQuery. - Compiled
Path Key - Compiled
Query Body - Instruction payload of a
CompiledLedgerQuery. - Compiled
RefExpr - Compiled
State Value
Functions§
- analyze_
compiled_ ops - Conservatively analyze a compiled dynamic VM-op slice for context/effects/state access.
- analyze_
ops - Conservatively analyze a concrete VM-op slice for context/effects/state access.
- compile_
vm_ ops - Pre-compile a slice of raw IR
VmInstrobjects into aCompiledLedgerQuery. - decode_
int_ arg - Decode a value that should resolve to an integer. Handles raw JSON
numbers,
{vm: align, value, bytes}literal-aligned values, and{vm: value->int, value: <ref-or-align>}runtime helpers. - decode_
op - Decode one vm-instr into a typed
Op<ResultModeGather, InMemoryDB>. - decode_
state_ value - Decode a
vm: state-valueobject into a ledgerStateValue.