Struct som_interpreter_bc::frame::Frame
source · pub struct Frame {
pub kind: FrameKind,
pub args: Vec<Value>,
pub locals: Vec<Value>,
pub bytecode_idx: usize,
}
Expand description
Represents a stack frame.
Fields§
§kind: FrameKind
This frame’s kind.
args: Vec<Value>
The arguments within this frame.
locals: Vec<Value>
The bindings within this frame.
bytecode_idx: usize
Bytecode index.
Implementations§
source§impl Frame
impl Frame
sourcepub fn get_method_holder(&self) -> SOMRef<Class>
pub fn get_method_holder(&self) -> SOMRef<Class>
Get the holder for this current method.
sourcepub fn get_method(&self) -> Rc<Method>
pub fn get_method(&self) -> Rc<Method>
Get the current method itself.
sourcepub fn get_bytecode(&self, idx: usize) -> Option<Bytecode>
pub fn get_bytecode(&self, idx: usize) -> Option<Bytecode>
Get the bytecode at the specified index for the current method.
sourcepub fn get_current_bytecode(&self) -> Option<Bytecode>
pub fn get_current_bytecode(&self) -> Option<Bytecode>
Get the current bytecode for the current method.
pub fn lookup_constant(&self, idx: usize) -> Option<Literal>
pub fn lookup_argument(&self, idx: usize) -> Option<Value>
sourcepub fn lookup_local(&self, idx: usize) -> Option<Value>
pub fn lookup_local(&self, idx: usize) -> Option<Value>
Search for a local binding.
Auto Trait Implementations§
impl Freeze for Frame
impl !RefUnwindSafe for Frame
impl !Send for Frame
impl !Sync for Frame
impl Unpin for Frame
impl !UnwindSafe for Frame
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