[−][src]Struct haru::vmbindings::env::Env
Stack frame for the virtual machine
Fields
slots: Vec<NativeValue>
Slot indexes access SHOULD be bounded whenever the script is compiled to bytecode
nargs: u16
Cached number of args the function was called with
lexical_parent: *const Env
Lexical parent of the current environment
This is used for getting values on the previous stack frame.
retip: u32
Instruction pointer to return to on OP_RET
Methods
impl Env
[src]
pub fn new(retip: u32, lexical_parent: *const Env, nargs: u16) -> Env
[src]
pub fn copy(other: &Env) -> Env
[src]
pub unsafe fn get(&self, idx: u16) -> NativeValue
[src]
pub unsafe fn get_up(&self, up: u16, idx: u16) -> NativeValue
[src]
pub unsafe fn set(&mut self, idx: u16, val: NativeValue)
[src]
pub fn reserve(&mut self, nslots: u16)
[src]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,