/** * Runs eval() sequentially on every branch, creating a new stack frame for each one. * * @param context the execution context */ protected final void projectAndEval(final ExecutionContext context) { forEachWithIndex( (i, branch) -> { context.newCallStackFrame(i.byteValue()); branch.eval(context); context.returnFromCallFrame(); }); }
@Override public void evalInNewStackFrame(final ExecutionContext context, final byte frameId) { context.newCallStackFrame(frameId); eval(context); context.returnFromCallFrame(); }