pub struct Stack { /* private fields */ }
Implementations§
Source§impl Stack
impl Stack
pub fn new() -> Stack
pub fn new_with_limit(limit: usize) -> Stack
pub fn len(&self) -> usize
Sourcepub fn frame_size(&self) -> usize
pub fn frame_size(&self) -> usize
How many values are on the current frame
Sourcepub fn push_frame(&mut self, params: usize, locals: usize) -> Trap<Frame>
pub fn push_frame(&mut self, params: usize, locals: usize) -> Trap<Frame>
Start a new stack frame by saving the current base pointer.
pub fn reserve_locals(&mut self, locals: usize) -> Trap<()>
Sourcepub fn pop_frame(&mut self, old_frame: Frame)
pub fn pop_frame(&mut self, old_frame: Frame)
Remove current stack frame and restore previous frame.
pub fn push_params(&mut self, params: &[Value]) -> Trap<usize>
pub fn drop_values(&mut self, count: u32) -> Trap<()>
pub fn tee_local(&mut self, local: LocalIdx) -> Trap<()>
pub fn set_local(&mut self, local: LocalIdx) -> Trap<()>
pub fn get_local(&mut self, local: LocalIdx) -> Trap<()>
pub fn set_local_val(&mut self, local: LocalIdx, val: StackValue)
pub fn get_local_val(&mut self, local: LocalIdx) -> StackValue
pub fn push_val(&mut self, val: StackValue) -> Trap<()>
pub fn pop_typed(&mut self, val_type: ValueType) -> Trap<Value>
pub fn pop_val(&mut self) -> Trap<StackValue>
pub fn top_val(&mut self) -> Trap<StackValue>
Sourcepub fn unop<F>(&mut self, op: F) -> Trap<()>
pub fn unop<F>(&mut self, op: F) -> Trap<()>
Apply a ‘unop’ to top value, replacing it with the results.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stack
impl RefUnwindSafe for Stack
impl Send for Stack
impl Sync for Stack
impl Unpin for Stack
impl UnwindSafe for Stack
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