pub struct Vm<Isa = Instr<ReservedOp>> where
Isa: InstructionSet, { /* private fields */ }
Expand description
Alu virtual machine providing single-core execution environment
Implementations
sourceimpl<Isa> Vm<Isa> where
Isa: InstructionSet,
impl<Isa> Vm<Isa> where
Isa: InstructionSet,
sourcepub fn registers(&self) -> &Box<CoreRegs>
pub fn registers(&self) -> &Box<CoreRegs>
Method borrowing Vm::registers
field.
A set of registers
sourcepub fn phantom(&self) -> &PhantomData<Isa>
pub fn phantom(&self) -> &PhantomData<Isa>
Method borrowing Vm::phantom
field.
sourceimpl<Isa> Vm<Isa> where
Isa: InstructionSet,
impl<Isa> Vm<Isa> where
Isa: InstructionSet,
Runtime for program execution.
sourcepub fn run(&mut self, program: &Program<Isa>) -> bool
pub fn run(&mut self, program: &Program<Isa>) -> bool
Executes the program starting from the provided entry point (set with
[Runtime::set_entrypoint
] and [Runtime::with
], or initialized to 0 offset of the
first used library if [Runtime::new
] was used).
Returns
Value of the st0
register at the end of the program execution.
Trait Implementations
sourceimpl<Isa: Debug> Debug for Vm<Isa> where
Isa: InstructionSet,
impl<Isa: Debug> Debug for Vm<Isa> where
Isa: InstructionSet,
Auto Trait Implementations
impl<Isa> RefUnwindSafe for Vm<Isa> where
Isa: RefUnwindSafe,
impl<Isa> Send for Vm<Isa> where
Isa: Send,
impl<Isa> Sync for Vm<Isa> where
Isa: Sync,
impl<Isa> Unpin for Vm<Isa> where
Isa: Unpin,
impl<Isa> UnwindSafe for Vm<Isa> where
Isa: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more