[][src]Struct zub::vm::vm::VM

pub struct VM {
    pub heap: Heap<Object>,
    pub globals: HashMap<String, Value, FnvBuildHasher>,
    pub open_upvalues: Vec<UpValue>,
    pub stack: Vec<Value>,
    pub frames: Vec<CallFrame>,
    // some fields omitted
}

Fields

heap: Heap<Object>globals: HashMap<String, Value, FnvBuildHasher>open_upvalues: Vec<UpValue>stack: Vec<Value>frames: Vec<CallFrame>

Implementations

impl VM[src]

pub fn new() -> Self[src]

pub fn exec_from(
    &mut self,
    atoms: &[ExprNode],
    locals: Vec<Local>,
    debug: bool
) -> Vec<Local>
[src]

pub fn exec(&mut self, atoms: &[ExprNode], debug: bool)[src]

pub fn add_native(
    &mut self,
    name: &str,
    func: fn(_: &Heap<Object>, _: &[Value]) -> Value,
    arity: u8
)
[src]

Auto Trait Implementations

impl !RefUnwindSafe for VM

impl !Send for VM

impl !Sync for VM

impl Unpin for VM

impl !UnwindSafe for VM

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.