[][src]Struct haru::vmbindings::vm::Vm

#[repr(C)]
pub struct Vm { pub ip: u32, pub localenv: *mut Env, pub localenv_bp: *mut Env, pub globalenv: *mut CHashMap, pub exframes: CArray<ExFrame>, pub code: CArray<VmOpcode>, pub stack: CArray<NativeValue>, pub dstr: *mut Record, pub dint: *mut Record, pub dfloat: *mut Record, pub darray: *mut Record, pub drec: *mut Record, pub error: VmError, pub error_expected: u32, pub exframe_fallthrough: *const ExFrame, pub native_call_depth: usize, pub compiler: Option<*mut Compiler>, }

Fields

ip: u32localenv: *mut Envlocalenv_bp: *mut Envglobalenv: *mut CHashMapexframes: CArray<ExFrame>code: CArray<VmOpcode>stack: CArray<NativeValue>dstr: *mut Recorddint: *mut Recorddfloat: *mut Recorddarray: *mut Recorddrec: *mut Recorderror: VmErrorerror_expected: u32exframe_fallthrough: *const ExFramenative_call_depth: usizecompiler: Option<*mut Compiler>

Methods

impl Vm[src]

pub fn new() -> Vm[src]

pub fn print_stack(&self)[src]

pub fn execute(&mut self)[src]

pub fn cpush8(&mut self, n: u8)[src]

pub fn cpush16(&mut self, n: u16)[src]

pub fn cpush32(&mut self, n: u32)[src]

pub fn cpush64(&mut self, n: u64)[src]

pub fn cpushf64(&mut self, n: f64)[src]

pub fn cpushs<T: Into<Vec<u8>>>(&mut self, s: T)[src]

pub fn cfill_label(&mut self, pos: usize, label: usize)[src]

pub fn cfill_label16(&mut self, pos: usize, label: u16)[src]

pub fn global(&mut self) -> &mut CHashMap[src]

pub fn mark(&mut self)[src]

pub fn enter_env(&mut self, fun: &'static mut Function)[src]

pub fn enter_env_tail(&mut self, fun: &'static mut Function)[src]

pub fn leave_env(&mut self)[src]

pub fn enter_exframe(&mut self) -> &mut ExFrame[src]

pub fn leave_exframe(&mut self)[src]

pub fn raise(&mut self) -> bool[src]

pub fn call(
    &mut self,
    fun: NativeValue,
    args: &CArray<NativeValue>
) -> Option<NativeValue>
[src]

pub fn new_exec_ctx(&mut self) -> ManuallyDrop<Vm>[src]

pub fn restore_exec_ctx(&mut self, ctx: ManuallyDrop<Vm>)[src]

pub fn load_module(&mut self, path: &str)[src]

Trait Implementations

impl Drop for Vm[src]

Auto Trait Implementations

impl !Send for Vm

impl !Sync for Vm

Blanket Implementations

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

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

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.

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

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

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