fix-vm: use Machine trait exclusively
This commit is contained in:
@@ -26,11 +26,15 @@ use crate::{
|
||||
/// - Imports and scope slots (`import_cache_*` / `scope_slot*` / `set_pending_load`)
|
||||
pub trait Machine<'gc> {
|
||||
fn push(&mut self, val: Value<'gc>);
|
||||
#[must_use]
|
||||
fn pop(&mut self) -> Value<'gc>;
|
||||
#[must_use]
|
||||
fn peek(&self, depth: usize) -> Value<'gc>;
|
||||
#[must_use]
|
||||
fn peek_forced(&self, depth: usize) -> StrictValue<'gc>;
|
||||
fn pop_forced(&mut self) -> StrictValue<'gc>;
|
||||
fn replace(&mut self, depth: usize, val: Value<'gc>);
|
||||
fn drop_n(&mut self, depth: usize);
|
||||
fn stack_len(&self) -> usize;
|
||||
|
||||
fn force_slot_to_pc(
|
||||
|
||||
Reference in New Issue
Block a user