pub struct ExecutionStack(/* private fields */);
Expand description
The ExecutionStack
is the stack of the CPU. It stores ExecutionPointer
s to every block of
code being executed at any moment.
Implementations§
Source§impl ExecutionStack
impl ExecutionStack
Sourcepub fn new() -> ExecutionStack
pub fn new() -> ExecutionStack
Create a new empty ExecutionStack
.
Sourcepub fn top(&self) -> Option<&ExecutionPointer>
pub fn top(&self) -> Option<&ExecutionPointer>
Get the top pointer on the stack. Returns None if the stack is empty.
Sourcepub fn jump(&mut self, target: &Symbol)
pub fn jump(&mut self, target: &Symbol)
Jump execution to a given symbol. Will not error, even if the symbol is undefined.
pub fn dump(&self) -> Vec<ExecutionPointer>
Trait Implementations§
Source§impl Clone for ExecutionStack
impl Clone for ExecutionStack
Source§fn clone(&self) -> ExecutionStack
fn clone(&self) -> ExecutionStack
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ExecutionStack
impl RefUnwindSafe for ExecutionStack
impl Send for ExecutionStack
impl Sync for ExecutionStack
impl Unpin for ExecutionStack
impl UnwindSafe for ExecutionStack
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.