pub struct VirtualMachine { /* private fields */ }Implementations§
Source§impl VirtualMachine
impl VirtualMachine
pub fn run(&mut self, chunk: &Chunk) -> Result<Value, String>
pub fn run_module(&mut self, module: &Module) -> Result<Value, String>
pub fn call_export( &mut self, module: &Module, name: &str, args: &[Value], ) -> Result<Value, String>
pub fn reset(&mut self)
pub fn run_to_yield(&mut self, module: &Module) -> Result<(), String>
pub fn resume(&mut self, module: &Module, input: Value) -> Result<bool, String>
Source§impl VirtualMachine
impl VirtualMachine
pub fn new() -> Self
pub fn with_static_names(self, names: Vec<String>) -> Self
pub fn with_step_cap(self, cap: u64) -> Self
pub fn with_heap_check(self, on: bool) -> Self
pub fn steps(&self) -> u64
pub fn halted(&self) -> bool
pub fn exit_code(&self) -> Option<i64>
pub fn with_heap_trace( self, slot: Option<u32>, all: bool, out: fn(&str), ) -> Self
pub fn with_trace_out(self, out: fn(&str)) -> Self
pub fn with_profile(self, on: bool) -> Self
pub fn with_trace_static(self, filter: Option<String>) -> Self
pub fn with_trace_frames(self, on: bool) -> Self
pub fn with_trace_filter(self, bits: Vec<bool>) -> Self
pub fn with_debug_sink(self, sink: DebugSink) -> Self
pub fn with_fn_names(self, names: Vec<String>) -> Self
pub fn profile_report(&self) -> String
pub fn region_push(&mut self)
pub fn region_pop(&mut self) -> Result<(), String>
pub fn region_depth(&self) -> usize
pub fn region_record_alloc(&mut self, slot: u32, generation: u32)
pub fn module_table_rc(&self) -> Option<u32>
pub fn heap_live_count(&self) -> usize
pub fn live_slots_report(&self) -> String
pub fn heap_ref(&self) -> &Heap
pub fn heap_mut(&mut self) -> &mut Heap
pub fn last_result_is_handle(&self) -> bool
pub fn install_device(&mut self, id: u8, dev: Box<dyn Device>)
pub fn register_native<S: Into<String>>(&mut self, name: S, func: NativeFn)
pub fn register_aot_fn<S: Into<String>>(&mut self, name: S, func: AotFn)
pub fn take_device(&mut self, id: u8) -> Option<Box<dyn Device>>
pub fn heap_alloc(&mut self, size: usize) -> (u32, u32)
pub fn heap_st( &mut self, slot: u32, gen_: u32, offset: usize, val: u64, is_handle: bool, ) -> Result<(u64, bool), String>
pub fn push_handler(&mut self, h: HandlerFrame)
Source§impl VirtualMachine
impl VirtualMachine
pub fn render_value(&self, raw: u64, is_handle: bool, depth: usize) -> String
pub fn drop_result_for_test(&mut self, raw: u64)
Auto Trait Implementations§
impl !RefUnwindSafe for VirtualMachine
impl !Send for VirtualMachine
impl !Sync for VirtualMachine
impl !UnwindSafe for VirtualMachine
impl Freeze for VirtualMachine
impl Unpin for VirtualMachine
impl UnsafeUnpin for VirtualMachine
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