void RaiseStepped(WamMachineStepEventArgs e) { if (Stepped != null) { Stepped(this, e); } }
public ExecutionResults StepOver() { if (State == WamMachineStates.Halt) { return(ExecutionResults.Failure); } PerformanceStatistics.Start(); var stepEventArgsState = new WamMachineStepEventArgsState(); var stepEventArgs = new WamMachineStepEventArgs(stepEventArgsState); var results = ExecutionResults.None; var initialStackIndex = StackIndex; var loop = true; while (loop) { results = Step(); if (results == ExecutionResults.Failure || results == ExecutionResults.Success) { loop = false; } else if (StackIndex <= initialStackIndex) { loop = false; } else { stepEventArgsState.InstructionPointer = InstructionPointer; RaiseStepped(stepEventArgs); if (stepEventArgs.Breakpoint) { loop = false; } } } PerformanceStatistics.Stop(); return(results); }
private void RaiseStepped(WamMachineStepEventArgs e) { if (Stepped != null) { Stepped(this, e); } }
public ExecutionResults StepOver() { if (State == WamMachineStates.Halt) { return ExecutionResults.Failure; } PerformanceStatistics.Start(); WamMachineStepEventArgsState stepEventArgsState = new WamMachineStepEventArgsState(); WamMachineStepEventArgs stepEventArgs = new WamMachineStepEventArgs(stepEventArgsState); ExecutionResults results = ExecutionResults.None; int initialStackIndex = StackIndex; bool loop = true; while (loop) { results = Step(); if (results == ExecutionResults.Failure || results == ExecutionResults.Success) { loop = false; } else if (StackIndex <= initialStackIndex) { loop = false; } else { stepEventArgsState.InstructionPointer = InstructionPointer; RaiseStepped(stepEventArgs); if (stepEventArgs.Breakpoint) { loop = false; } } } PerformanceStatistics.Stop(); return results; }
public ExecutionResults RunToSuccess() { if (State == WamMachineStates.Halt) { return ExecutionResults.Failure; } PerformanceStatistics.Start(); var stepEventArgsState = new WamMachineStepEventArgsState(); var stepEventArgs = new WamMachineStepEventArgs(stepEventArgsState); var results = ExecutionResults.None; var loop = true; while (loop) { results = Step(); if (results == ExecutionResults.Failure || results == ExecutionResults.Success) { loop = false; } else { stepEventArgsState.InstructionPointer = InstructionPointer; RaiseStepped(stepEventArgs); if (stepEventArgs.Breakpoint) { loop = false; } } } PerformanceStatistics.Stop(); return results; }