pub struct VMState {
pub current_frame: CallFrame,
/* private fields */
}
Expand description
Manages all the state involved with the VM’s execution, namely the stack, global variables, the heap, and the call frames
Fields§
§current_frame: CallFrame
Implementations§
Source§impl VMState
impl VMState
pub fn deref(&self, pointer: usize) -> &HeapObj
pub fn deref_mut(&mut self, pointer: usize) -> &mut HeapObj
pub fn deref_list(&self, pointer: usize) -> &ObjList
pub fn deref_list_mut(&mut self, pointer: usize) -> &ObjList
pub fn deref_string(&self, pointer: usize) -> &ObjString
pub fn deref_string_mut(&mut self, pointer: usize) -> &mut ObjString
pub fn create_string(&mut self, s: String)
Trait Implementations§
impl StructuralPartialEq for VMState
Auto Trait Implementations§
impl Freeze for VMState
impl RefUnwindSafe for VMState
impl Send for VMState
impl Sync for VMState
impl Unpin for VMState
impl UnwindSafe for VMState
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