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 current_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 link_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, pub closure_type: Variable, }
Fields
stack: Vec<Variable>
call_stack: Vec<Call>
name, file, stack_len, local_len.
local_stack: Vec<(Arc<String>, usize)>
current_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
link_type: Variable
ref_type: Variable
unsafe_ref_type: Variable
rust_object_type: Variable
option_type: Variable
result_type: Variable
thread_type: Variable
closure_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<Option<Variable>, String>
call: &Call,
module: &Module,
f: F)
-> Result<Option<Variable>, String>
fn push_fn(&mut self,
name: Arc<String>,
index: usize,
file: Option<Arc<String>>,
st: usize,
lc: usize,
cu: usize)
name: Arc<String>,
index: usize,
file: Option<Arc<String>>,
st: usize,
lc: usize,
cu: usize)
fn pop_fn(&mut self, name: Arc<String>)
fn expression(&mut self,
expr: &Expression,
side: Side,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
expr: &Expression,
side: Side,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
fn try(&mut self,
expr: &Expression,
side: Side,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
expr: &Expression,
side: Side,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
fn run(&mut self, module: &Arc<Module>) -> Result<(), String>
fn go(&mut self,
go: &Go,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
go: &Go,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
fn call_closure(&mut self,
call: &CallClosure,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
call: &CallClosure,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
fn call(&mut self,
call: &Call,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
call: &Call,
module: &Arc<Module>)
-> Result<(Option<Variable>, Flow), String>
fn call_str(&mut self,
function: &str,
args: &[Variable],
module: &Arc<Module>)
-> Result<(), String>
function: &str,
args: &[Variable],
module: &Arc<Module>)
-> Result<(), String>