class Result
Result of evaluating an expression.
Results form a tree that controls execution order and message passing between Ops.
index
members
-
result:is_const()
– return whether this Result’s value is const. -
result:const([msg])
– assert value-constness and return the value. -
result:type()
– assert this result has a value, return its type. -
result:metatype()
– assert this result has a value, returns its metatype. -
result:make_ref()
– create a copy of this result with value-copy semantics. -
result:poll_io()
– poll all IOStream instances that are effecting this (sub)tree. -
result:tick()
– in depth-first order, tick all Ops which have dirty Inputs. -
result.value
– the Stream result -
result.op
– an Op -
result.children
– list of child Results from subexpressions -
result.side_inputs
– cached mapping of all Stream/Input pairs affecting this Result.
static functions
-
Result(params)
– create a new Result.
details
members
-
– return whether this Result’s value is const.
-
– assert value-constness and return the value.
parameters:
- the error message to throw (optional)
returns:
- (any)
-
– assert this result has a value, return its type.
returns:
- (string)
-
– assert this result has a value, returns its metatype.
returns:
-
(string):
"value"
or"event"
-
(string):
-
– create a copy of this result with value-copy semantics.
the copy has the same @value and @side_inputs, but will not update anything on \tick.
-
– poll all IOStream instances that are effecting this (sub)tree.
should be called once per frame on the root, right before tick.
-
– in depth-first order, tick all Ops which have dirty Inputs.
short-circuits if there are no dirty Inputs in the entire subtree
-
– the Stream result
-
– an Op
-
– list of child Results from subexpressions
-
– cached mapping of all Stream/Input pairs affecting this Result.
This is the union of all childrens side_inputs and all Inputs from op that are not the value of any child.
static functions
-
– create a new Result.
parameters:
- table with optional keys op, value, children. default: {}