public Thread(Node node, InstructionStream instructionStream, AutomataContextState contextState) : this() { CurrentNode = node; InstructionPointer = InstructionStream.InitializeInstructionPointer(); InstructionStream = instructionStream.AddReference(); ContextState = contextState; }
public AutomataExecutionContext Mount(InstructionStream instructionStream, int instructionPointer, Node node, AutomataStack stack) { InstructionStream = instructionStream.AddReference(); InstructionPointer = instructionPointer; Node = node; Stack = stack.AddReference(); return(AddReference()); }
public AutomataExecutionContext Clone() { var clone = Pool.Get().AddReference(); clone.Stack = Stack.Clone(); clone.InstructionStream = InstructionStream.AddReference(); clone.InstructionPointer = InstructionPointer; clone.Node = Node; return(clone); }
public Thread(ThreadParent parent, Node node, InstructionStream instructionStream, int instructionPointer, AutomataContextState contextState) : this() { CurrentNode = node; InstructionPointer = instructionPointer; ContextState = contextState; InstructionStream = instructionStream.AddReference(); InstructionStream.LockPointer(InstructionPointer); if (parent == null) { return; } Parent = parent; Parent.AddReference(); }