public ExecutionPathMethodCollection(IILBuilder ilBuilder, Automata <TInstruction, TOperand> automata) { _ilBuilder = ilBuilder; _automata = automata; var length = 128; while (length < automata._executionPathRegistry.Count) { length *= 2; } _executionPaths = new ExecutionPathMethod[length]; for (var i = 0; i < length; i++) { _executionPaths[i] = new ExecutionPathMethod(_ilBuilder, automata, i); } }
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)); }; }
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 CachingILBuilder(IILBuilder wrapping) { Wrapping = wrapping; }
public CodeParser(string codeFilePath, IILBuilder ilBuider) { CodeFilePath = codeFilePath; ILBuilder = ilBuider; }