Struct aluvm::Vm [−][src]
pub struct Vm<E = ReservedOp> where
E: InstructionSet, { /* fields omitted */ }
Expand description
Alu virtual machine providing single-core execution environment
Implementations
Method borrowing Vm::libs
field.
Libraries known to the runtime, identified by their hashes
Method borrowing Vm::entrypoint
field.
Entrypoint for the main function
Method borrowing Vm::registers
field.
A set of registers
Constructs new virtual machine with no code in it.
Calling Vm::main
on it will result in machine termination with st0
set to false
.
Adds Alu bytecode library to the virtual machine.
Returns
true
if the library was already known and false
otherwise.
Sets new entry point value (used when calling Vm::main
)
Executes the program starting from the provided entry point (set with Vm::set_entrypoint
or initialized to 0 offset of the first used library if Vm::new
, Vm::default
or
Vm::with
were used).
Returns
Value of the st0
register at the end of the program execution.
Trait Implementations
Auto Trait Implementations
impl<E> RefUnwindSafe for Vm<E> where
E: RefUnwindSafe,
impl<E> UnwindSafe for Vm<E> where
E: RefUnwindSafe,