Class StreamOperandsEvaluatedAhead
A stage operand that is a bare identifier names a function (a singleton) or a delegate variable. A
call or objectAccessExpression operand - an inline dynamic function
(| map with (names) is nameMapper as function (...)), | map with makeMapper(),
| filter by holder.predicate() - names neither: it is an expression whose VALUE is the function.
It must be evaluated exactly once, before the loop (a dynamic function's captures are taken when it is
created, and its state lives across iterations), and every stage then LOADs the resulting variable.
Before this, such operands were never evaluated: the stage asked for a singleton of the function's
TYPE, so an inline dynamic function's class was never generated at all (NoClassDefFoundError,
QA0059) and a call returning a function reached for an abstract type's missing getInstance().
StreamStatementGenerator records the variables; AbstractStreamStageGenerator reads them
wherever a stage fetches its function instance. Keyed by parse-tree identity, so one instance per
GeneratorSet serves every stream in the construct.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidrecord(EK9Parser.PipelinePartContext pipelinePart, String variable) variableFor(EK9Parser.PipelinePartContext pipelinePart)
-
Constructor Details
-
StreamOperandsEvaluatedAhead
StreamOperandsEvaluatedAhead()
-
-
Method Details
-
record
-
variableFor
-