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, pub in_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
in_type: Variable
Methods
impl Runtime
[src]
impl Runtime
pub fn new() -> Runtime
[src]
pub fn new() -> Runtime
pub fn pop<T: PopVariable>(&mut self) -> Result<T, String>
[src]
pub fn pop<T: PopVariable>(&mut self) -> Result<T, String>
pub fn pop_vec4<T: ConvertVec4>(&mut self) -> Result<T, String>
[src]
pub fn pop_vec4<T: ConvertVec4>(&mut self) -> Result<T, String>
pub fn var<T: PopVariable>(&self, var: &Variable) -> Result<T, String>
[src]
pub fn var<T: PopVariable>(&self, var: &Variable) -> Result<T, String>
pub fn var_vec4<T: ConvertVec4>(&self, var: &Variable) -> Result<T, String>
[src]
pub fn var_vec4<T: ConvertVec4>(&self, var: &Variable) -> Result<T, String>
pub fn push<T: PushVariable>(&mut self, val: T)
[src]
pub fn push<T: PushVariable>(&mut self, val: T)
Push value to stack.
pub fn push_vec4<T: ConvertVec4>(&mut self, val: T)
[src]
pub fn push_vec4<T: ConvertVec4>(&mut self, val: T)
Push Vec4 to stack.
pub fn push_rust<T: 'static>(&mut self, val: T)
[src]
pub fn push_rust<T: 'static>(&mut self, val: T)
Pushes Rust object to stack.
pub fn expected(&self, var: &Variable, ty: &str) -> String
[src]
pub fn expected(&self, var: &Variable, ty: &str) -> String
pub fn resolve<'a>(&'a self, var: &'a Variable) -> &'a Variable
[src]
pub fn resolve<'a>(&'a self, var: &'a Variable) -> &'a Variable
pub fn unary_f64<F: FnOnce(f64) -> f64>(
&mut self,
call: &Call,
module: &Module,
f: F
) -> Result<Option<Variable>, String>
[src]
pub fn unary_f64<F: FnOnce(f64) -> f64>(
&mut self,
call: &Call,
module: &Module,
f: F
) -> Result<Option<Variable>, String>
pub fn push_fn(
&mut self,
name: Arc<String>,
index: usize,
file: Option<Arc<String>>,
st: usize,
lc: usize,
cu: usize
)
[src]
pub fn push_fn(
&mut self,
name: Arc<String>,
index: usize,
file: Option<Arc<String>>,
st: usize,
lc: usize,
cu: usize
)
pub fn pop_fn(&mut self, name: Arc<String>)
[src]
pub fn pop_fn(&mut self, name: Arc<String>)
pub fn expression(
&mut self,
expr: &Expression,
side: Side,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
[src]
pub fn expression(
&mut self,
expr: &Expression,
side: Side,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
pub fn try(
&mut self,
expr: &Expression,
side: Side,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
[src]
pub fn try(
&mut self,
expr: &Expression,
side: Side,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
pub fn run(&mut self, module: &Arc<Module>) -> Result<(), String>
[src]
pub fn run(&mut self, module: &Arc<Module>) -> Result<(), String>
pub fn go(
&mut self,
go: &Go,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
[src]
pub fn go(
&mut self,
go: &Go,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
pub fn call_closure(
&mut self,
call: &CallClosure,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
[src]
pub fn call_closure(
&mut self,
call: &CallClosure,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
pub fn call(
&mut self,
call: &Call,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
[src]
pub fn call(
&mut self,
call: &Call,
module: &Arc<Module>
) -> Result<(Option<Variable>, Flow), String>
Called from the outside, e.g. a loader script by call
or call_ret
intrinsic.
pub fn call_str(
&mut self,
function: &str,
args: &[Variable],
module: &Arc<Module>
) -> Result<(), String>
[src]
pub fn call_str(
&mut self,
function: &str,
args: &[Variable],
module: &Arc<Module>
) -> Result<(), String>
Calls function by name.
pub fn call_str_ret(
&mut self,
function: &str,
args: &[Variable],
module: &Arc<Module>
) -> Result<Variable, String>
[src]
pub fn call_str_ret(
&mut self,
function: &str,
args: &[Variable],
module: &Arc<Module>
) -> Result<Variable, String>
Call function by name, returning a value.
pub fn typeof_var(&self, var: &Variable) -> Arc<String>
[src]
pub fn typeof_var(&self, var: &Variable) -> Arc<String>
pub fn stack_trace(&self) -> String
[src]
pub fn stack_trace(&self) -> String