public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) {
    // Set up the code attribute editor.
    codeAttributeEditor.reset(codeAttribute.u4codeLength);

    // Find the peephole changes.
    codeAttribute.instructionsAccept(clazz, method, instructionSequenceReplacer);

    // Apply the peephole changes.
    codeAttributeEditor.visitCodeAttribute(clazz, method, codeAttribute);
  }
Пример #2
0
  public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) {
    markAsUsed(codeAttribute);

    markConstant(clazz, codeAttribute.u2attributeNameIndex);

    // Mark the constant pool entries referenced by the instructions,
    // by the exceptions, and by the attributes.
    codeAttribute.instructionsAccept(clazz, method, this);
    codeAttribute.exceptionsAccept(clazz, method, this);
    codeAttribute.attributesAccept(clazz, method, this);
  }