pub struct VM {
pub globals: Vec<Rc<Object>>,
/* private fields */
}Fields§
§globals: Vec<Rc<Object>>Implementations§
Source§impl VM
impl VM
pub fn new(bytecode: Bytecode) -> VM
pub fn new_with_global_store(bytecode: Bytecode, globals: Vec<Rc<Object>>) -> VM
Sourcepub fn run(&mut self)
pub fn run(&mut self)
Run bytecode while retaining the error for callers of the original API.
New code should prefer Self::run_checked so failures cannot be ignored.
pub fn run_checked(&mut self) -> Result<(), VmRuntimeError>
pub fn last_error(&self) -> Option<&VmRuntimeError>
pub fn last_popped_stack_elm(&self) -> Option<Rc<Object>>
Auto Trait Implementations§
impl !RefUnwindSafe for VM
impl !Send for VM
impl !Sync for VM
impl !UnwindSafe for VM
impl Freeze for VM
impl Unpin for VM
impl UnsafeUnpin for VM
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