예제 #1
0
  /** Sets the stack for the instruction at the specified offset * */
  public void set(int offset, Frame f) {

    OperandStack os = f.getStack();
    // logger.info ("stack[" + offset + "] = " + toString(os));

    if (track_locals) loc_arr[offset] = (LocalVariables) f.getLocals().clone();

    os_arr[offset] = (OperandStack) os.clone();
  }
예제 #2
0
  /** TODO */
  public String toString(OperandStack os) {

    String buff = "";

    for (int i = 0; i < os.size(); i++) {
      if (buff.length() > 0) buff += ", ";
      Type t = os.peek(i);
      if (t instanceof UninitializedObjectType) buff += "uninitialized-object";
      else buff += t;
    }

    return ("{" + buff + "}");
  }