pub(crate) struct LispStack<'a> {
vec: Vec<Slot<Gc<ObjectType<'a>>>>,
current: Frame,
frames: Vec<FrameStore<'a>>,
}
Expand description
The stack of lisp objects used to pass and store arguments in the bytecode VM and interpreter. The top of the stack is index 0 and all indexing functions operate from top to bottom. The stack is partitioned into frames. Each frame represents a function call and it’s arguments. The API is designed so that code cannot access elements outside of their frame (doing so results in a panic). Frames are added and removed with push_frame and pop_frame respectively.
Fields§
§vec: Vec<Slot<Gc<ObjectType<'a>>>>
§current: Frame
§frames: Vec<FrameStore<'a>>
Trait Implementations§
Source§impl<'a> RootedDeref for LispStack<'a>
impl<'a> RootedDeref for LispStack<'a>
type Target = RootedLispStack<'a>
fn rooted_deref(rooted: &Rt<Self>) -> &Self::Target
fn rooted_derefmut(rooted: &mut Rt<Self>) -> &mut Self::Target
Auto Trait Implementations§
impl<'a> Freeze for LispStack<'a>
impl<'a> !RefUnwindSafe for LispStack<'a>
impl<'a> !Send for LispStack<'a>
impl<'a> !Sync for LispStack<'a>
impl<'a> Unpin for LispStack<'a>
impl<'a> !UnwindSafe for LispStack<'a>
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