Esempio n. 1
0
  /** Start the method's visit. */
  public void start() {
    if (!mg.isAbstract() && !mg.isNative()) {
      for (InstructionHandle ih = mg.getInstructionList().getStart();
          ih != null;
          ih = ih.getNext()) {
        Instruction i = ih.getInstruction();

        if (!visitInstruction(i)) i.accept(this);
      }
      updateExceptionHandlers();
    }
  }
Esempio n. 2
0
  /** Visit a single instruction. */
  private boolean visitInstruction(Instruction i) {
    short opcode = i.getOpcode();

    return ((InstructionConstants.INSTRUCTIONS[opcode] != null)
        && !(i instanceof ConstantPushInstruction)
        && !(i instanceof ReturnInstruction));
  }