Expand description
JAR v3 execution engine.
Pure PVM execution: interpreter, recompiler (JIT), memory pages,
gas metering, registers, ExitReason, and an EcallHandler trait
that abstracts the ecall ABI from the engine.
No knowledge of capabilities or caps. The execution engine knows
it has registers, memory pages, gas budget, and an opaque ecall
number; the caller (the javm integration crate) supplies the
EcallHandler that interprets ecall numbers as MGMT operations,
host-call selectors, etc.
Cherry-picked from v2 javm/src/{interpreter,recompiler,memory, gas} with cap-aware code stripped. See
~/docs/minimum-v3/implementation/architecture.md for the
layering.
Re-exports§
pub use decode::DecodedInst;pub use decode::Predecoded;pub use decode::predecode;pub use ecall::EcallHandler;pub use ecall::EcallKind;pub use ecall::EcallResult;pub use ecall::PanickingHandler;pub use error::ProgramError;pub use exit::ExitReason;pub use gas::Gas;pub use gas::GasCounter;pub use gas::OutOfGas;pub use instruction::InstructionCategory;pub use instruction::Opcode;pub use instruction::decode_opcode_fast;pub use interp::Interpreter;pub use mem::Access;pub use mem::CopyingMemory;pub use mem::MapError;pub use mem::Mem;pub use mem::MemAccess;pub use mem::Memory;pub use mem::PAGE_SIZE;pub use mem::perm;pub use program::PvmProgram;pub use program::compute_mem_cycles;pub use program::unpack_bitmask;pub use regs::REG_COUNT;pub use regs::Regs;
Modules§
- args
- Instruction argument decoding (JAM Gray Paper Appendix A.5).
- decode
- PVM bytecode predecoding.
- ecall
EcallHandlertrait: how the execution engine dispatches ecalls to the integration layer.- error
- Errors raised by execution-engine APIs.
- exit
ExitReason: terminal status from an execution batch.- gas
- Gas counter: a non-negative u64 representing remaining budget.
- gas_
cost - Per-basic-block gas cost model (JAR v0.8.0).
- gas_sim
- Single-pass pipeline gas model (JAR v0.8.0).
- instruction
- PVM instruction set (JAM Gray Paper Appendix A.5).
- interp
- Byte-PVM interpreter.
- mem
- Flat-buffer memory model + the
Memorytrait that abstracts over different memory backends (software-copy here, hardware-paged in the bare-metal Hyperlight guest). - predecoded
- Pre-decoded PVM instruction representation, shared between the
pure execution-engine gas accounting (here in
javm-exec) and the recompiler crate that populates the slice via itspredecodepass. - program
- PVM program input: raw bytecode + bitmask + jump table.
- regs
- Register state: 13 general-purpose 64-bit registers + PC.