Enum oxischeme::eval::Trampoline [-]  [+] [src]

pub enum Trampoline {
    Value(RootedValue),
    Thunk(RootedActivationPtr, Meaning),
}

To optimize tail calls and eliminate the stack frames that would otherwise be used by them, we trampoline thunks in a loop and encode that process in this type.

Variants

Value
Thunk

Methods

impl Trampoline

fn run(self, heap: &mut Heap) -> SchemeResult

Keep evaluating thunks until it yields a value.

Trait Implementations

Derived Implementations

impl Debug for Trampoline

fn fmt(&self, __arg_0: &mut Formatter) -> Result