Struct librsnek::runtime::interpreter::InterpreterFrame   
                   
                       [−]
                   
               [src]
struct InterpreterFrame {
    frame: RtObject,
    stack: RefCell<List>,
    lineno: Cell<usize>,
}Attaches extra data to a frame object which is Interpreter runtime execution
Fields
frame: RtObject
                           
                           
                           stack: RefCell<List>
                           
                           
                           lineno: Cell<usize>
                           Methods
impl InterpreterFrame[src]
fn new(frame: RtObject) -> Self
Create a new frame from an RtObject. Note that there are no asserts
fn object(&self) -> &RtObject
Get the reference to the object that represents the frame.
fn stack(&self) -> Ref<List>
Get a Ref to the frame's value stack.
fn line(&self) -> usize
The most recent line number. The parser and compiler eat a lot of the
fn set_line(&self, line: usize) -> usize
Called by the interpreter to set the line of the frame
fn push_stack(&self, objref: &RtObject)
Push an object onto this frame's value stack. That object will become
fn pop_stack(&self) -> Option<RtObject>
Pop a value off of the value stack if present.
fn clear_stack(&self)
Remove all values in this frame's value stack. For use in the current
Trait Implementations
impl Clone for InterpreterFrame[src]
fn clone(&self) -> InterpreterFrame
Returns a copy of the value.
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source.