pub struct VM {
pub arena: Arena,
/* private fields */
}Expand description
The Aver bytecode virtual machine.
Fields§
§arena: ArenaImplementations§
Source§impl VM
impl VM
pub fn new(code: CodeStore, globals: Vec<NanValue>, arena: Arena) -> Self
pub fn start_profiling(&mut self)
pub fn clear_profile(&mut self)
pub fn profile_report(&self) -> Option<VmProfileReport>
pub fn profile_top_bigrams(&self, n: usize) -> Vec<((u8, u8), u64)>
Sourcepub fn set_cli_args(&mut self, args: Vec<String>)
pub fn set_cli_args(&mut self, args: Vec<String>)
Set CLI arguments for Args.get().
pub fn set_silent_console(&mut self, silent: bool)
Sourcepub fn set_runtime_policy(&mut self, config: ProjectConfig)
pub fn set_runtime_policy(&mut self, config: ProjectConfig)
Set the runtime policy loaded from aver.toml.
Sourcepub fn start_recording(&mut self)
pub fn start_recording(&mut self)
Start recording effectful calls.
Sourcepub fn start_replay(&mut self, effects: Vec<EffectRecord>, validate_args: bool)
pub fn start_replay(&mut self, effects: Vec<EffectRecord>, validate_args: bool)
Start replaying from recorded effects.
pub fn recorded_effects(&self) -> &[EffectRecord]
pub fn replay_progress(&self) -> (usize, usize)
pub fn ensure_replay_consumed(&self) -> Result<(), VmError>
pub fn run(&mut self) -> Result<NanValue, VmError>
pub fn run_top_level(&mut self) -> Result<(), VmError>
pub fn run_named_function( &mut self, name: &str, args: &[NanValue], ) -> Result<NanValue, VmError>
pub fn call_function( &mut self, fn_id: u32, args: &[NanValue], ) -> Result<NanValue, VmError>
Auto Trait Implementations§
impl Freeze for VM
impl RefUnwindSafe for VM
impl !Send for VM
impl !Sync for VM
impl Unpin for VM
impl UnsafeUnpin for VM
impl UnwindSafe for VM
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