Struct oxischeme::environment::Activation
[-]
[+]
[src]
pub struct Activation { // some fields omitted }
An Activation
represents a runtime instance of a lexical block (either a
lambda or the global top-level).
Methods
impl Activation
fn extend(heap: &mut Heap, parent: &RootedActivationPtr, values: Vec<RootedValue>) -> RootedActivationPtr
Extend the given Activation
with the values supplied, resulting in a
new Activation
instance.
fn fetch(&self, heap: &mut Heap, i: u32, j: u32) -> Result<RootedValue, ()>
Fetch the j'th variable from the i'th lexical activation.
Returns an error when trying to fetch the value of a variable that has not yet been defined.
fn update(&mut self, i: u32, j: u32, val: &RootedValue) -> Result<(), ()>
Set the j'th variable from the i'th lexical activation to the given value.
Returns an error when trying to set a variable that has not yet been defined.
fn define(&mut self, j: u32, val: Value)
Define the j'th variable of this activation to be the given value.