Struct dyon::runtime::Runtime [] [src]

pub struct Runtime {
    pub stack: Vec<Variable>,
    pub call_stack: Vec<Call>,
    pub local_stack: Vec<(Arc<String>, usize)>,
    pub ret: Arc<String>,
    pub rng: StdRng,
    pub text_type: Variable,
    pub f64_type: Variable,
    pub vec4_type: Variable,
    pub return_type: Variable,
    pub bool_type: Variable,
    pub object_type: Variable,
    pub array_type: Variable,
    pub ref_type: Variable,
    pub unsafe_ref_type: Variable,
    pub rust_object_type: Variable,
    pub option_type: Variable,
    pub result_type: Variable,
    pub thread_type: Variable,
}

Fields

stack: Vec<Variable> call_stack: Vec<Call>

name, file, stack_len, local_len.

local_stack: Vec<(Arc<String>, usize)> ret: Arc<String> rng: StdRng text_type: Variable f64_type: Variable vec4_type: Variable return_type: Variable bool_type: Variable object_type: Variable array_type: Variable ref_type: Variable unsafe_ref_type: Variable rust_object_type: Variable option_type: Variable result_type: Variable thread_type: Variable

Methods

impl Runtime
[src]

fn new() -> Runtime

fn pop<T: PopVariable>(&mut self) -> Result<T, String>

fn pop_vec4<T: ConvertVec4>(&mut self) -> Result<T, String>

fn var<T: PopVariable>(&self, var: &Variable) -> Result<T, String>

fn var_vec4<T: ConvertVec4>(&self, var: &Variable) -> Result<T, String>

fn push<T: PushVariable>(&mut self, val: T)

fn push_vec4<T: ConvertVec4>(&mut self, val: T)

fn expected(&self, var: &Variable, ty: &str) -> String

fn resolve<'a>(&'a self, var: &'a Variable) -> &'a Variable

fn unary_f64<F: FnOnce(f64) -> f64>(&mut self, call: &Call, module: &Module, f: F) -> Result<ExpectString>

fn push_fn(&mut self, name: Arc<String>, file: Option<Arc<String>>, st: usize, lc: usize)

fn pop_fn(&mut self, name: Arc<String>)

fn expression(&mut self, expr: &Expression, side: Side, module: &Module) -> Result<(Expect, Flow)String>

fn try(&mut self, expr: &Expression, side: Side, module: &Module) -> Result<(Expect, Flow)String>

fn run(&mut self, module: &Module) -> Result<()String>

fn go(&mut self, go: &Go, module: &Module) -> Result<(Expect, Flow)String>

fn call(&mut self, call: &Call, module: &Module) -> Result<(Expect, Flow)String>

fn typeof_var(&self, var: &Variable) -> Arc<String>

fn stack_trace(&self) -> String