pub struct Interpreter;Expand description
PVM2 interpreter namespace.
Implementations§
Source§impl Interpreter
impl Interpreter
Sourcepub fn run_program<M: Memory>(
program: &Program,
regs: &mut Regs,
mem: &mut M,
gas: &mut GasCounter,
handler: &mut dyn EcallHandler,
) -> ExitReason
pub fn run_program<M: Memory>( program: &Program, regs: &mut Regs, mem: &mut M, gas: &mut GasCounter, handler: &mut dyn EcallHandler, ) -> ExitReason
Convenience wrapper for Interpreter::run that accepts a
cached Program.
Sourcepub fn run<M: Memory>(
predecode: &Predecode,
code: &[u8],
code_base: u32,
regs: &mut Regs,
mem: &mut M,
gas: &mut GasCounter,
handler: &mut dyn EcallHandler,
) -> ExitReason
pub fn run<M: Memory>( predecode: &Predecode, code: &[u8], code_base: u32, regs: &mut Regs, mem: &mut M, gas: &mut GasCounter, handler: &mut dyn EcallHandler, ) -> ExitReason
Execute the predecoded PVM2 program starting at regs.pc (a
byte-offset into the code region). code_base is the guest VA
the region is mapped at: jal/jalr/auipc produce and consume
code addresses as code_base + offset.
Auto Trait Implementations§
impl Freeze for Interpreter
impl RefUnwindSafe for Interpreter
impl Send for Interpreter
impl Sync for Interpreter
impl Unpin for Interpreter
impl UnsafeUnpin for Interpreter
impl UnwindSafe for Interpreter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more