Ejemplo n.º 1
0
  public void PopStacks() {
    _floatFrameStack.pop();
    _intFrameStack.pop();
    _boolFrameStack.pop();
    _codeFrameStack.pop();
    _nameFrameStack.pop();

    AssignStacksFromFrame();
  }
Ejemplo n.º 2
0
  /**
   * Steps a Push interpreter forward with a given instruction limit.
   *
   * <p>This method assumes that the intepreter is already setup with an active program (typically
   * using \ref Execute).
   *
   * @param inMaxSteps The maximum number of instructions allowed to be executed.
   * @return The number of instructions executed.
   */
  public int Step(int inMaxSteps) {
    int executed = 0;
    while (inMaxSteps != 0 && _execStack.size() > 0) {
      ExecuteInstruction(_execStack.pop());
      inMaxSteps--;
      executed++;
    }

    _totalStepsTaken += executed;

    return executed;
  }