public ExecutionPathMethod(ExecutionPath executionPath, IILBuilder builder, bool lazy) { if (lazy) { _mainDelegate = (process, threadStack, closure) => { _mainDelegate = builder.BuildMain(executionPath, out _mainClosure); return(_mainDelegate(process, threadStack, _mainClosure)); }; _parallelDelegate = (process, threadStack, closure) => { _parallelDelegate = builder.BuildParallel(executionPath, out _parallelClosure); return(_parallelDelegate(process, threadStack, _parallelClosure)); }; } else { _mainDelegate = builder.BuildMain(executionPath, out _mainClosure); _parallelDelegate = builder.BuildParallel(executionPath, out _parallelClosure); } }
public ExecutionPathMethod(IILBuilder builder, Automata <TInstruction, TOperand> automata, int index) { _mainDelegate = (process, threadStack, closure) => { var executionPath = automata._executionPathRegistry[index]; _mainDelegate = builder.BuildMain(executionPath, out _mainClosure); return(_mainDelegate(process, threadStack, _mainClosure)); }; _parallelDelegate = (process, threadStack, closure) => { var executionPath = automata._executionPathRegistry[index]; _parallelDelegate = builder.BuildParallel(executionPath, out _parallelClosure); return(_parallelDelegate(process, threadStack, _parallelClosure)); }; }