public void PushContext(WamInstructionStream instructionStream) { if (instructionStream == null) { throw new ArgumentNullException("instructionStream"); } WamContext context = new WamContext(); m_contextStack.Push(context); m_currentContext = context; State = WamMachineStates.Run; InstructionPointer = new WamInstructionPointer(instructionStream); ReturnInstructionPointer = WamInstructionPointer.Undefined; StackIndex = 0; Environment = null; ChoicePoint = null; ArgumentRegisters.Clear(); TemporaryRegisters.Clear(); CurrentStructure = null; CurrentStructureIndex = -1; }
internal void InvalidateInstructionStream() { m_wamInstructionStream = null; if (m_prologInstructionStream != null) { m_prologInstructionStream = null; RaisePropertyChanged(new PropertyChangedEventArgs("PrologInstructionStream")); } }
public void SetInstructionStream(WamInstructionStream instructionStream) { if (instructionStream == null) { throw new ArgumentNullException("instructionStream"); } ReturnInstructionPointer = InstructionPointer.GetNext(); CutChoicePoint = ChoicePoint; TemporaryRegisters.Clear(); StackIndex += 1; InstructionPointer = new WamInstructionPointer(instructionStream); }