/** * Appends the given label with the given old offset. * @param oldInstructionOffset the old offset of the label, to which * branches and other references in the current * code fragment are pointing. */ public CompactCodeAttributeComposer appendLabel(int oldInstructionOffset) { codeAttributeComposer.appendLabel(oldInstructionOffset); return this; }
/** * Appends the given label with the given old offset. * @param oldInstructionOffset the old offset of the label, to which * branches and other references in the current * code fragment are pointing. */ public CompactCodeAttributeComposer appendLabel(int oldInstructionOffset) { codeAttributeComposer.appendLabel(oldInstructionOffset); return this; }
/** * Appends the given label with the given old offset. * @param oldInstructionOffset the old offset of the label, to which * branches and other references in the current * code fragment are pointing. */ public CompactCodeAttributeComposer appendLabel(int oldInstructionOffset) { codeAttributeComposer.appendLabel(oldInstructionOffset); return this; }
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction) { if (branchTargetFinder.isSubroutineStart(offset)) { if (DEBUG) { System.out.println(" Replacing first subroutine instruction "+instruction.toString(offset)+" by a label"); } // Append a label at this offset instead of saving the subroutine // return address. codeAttributeComposer.appendLabel(offset); } else { // Append the instruction. codeAttributeComposer.appendInstruction(offset, instruction); } }
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction) { if (branchTargetFinder.isSubroutineStart(offset)) { if (DEBUG) { System.out.println(" Replacing first subroutine instruction "+instruction.toString(offset)+" by a label"); } // Append a label at this offset instead of saving the subroutine // return address. codeAttributeComposer.appendLabel(offset); } else { // Append the instruction. codeAttributeComposer.appendInstruction(offset, instruction); } }
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction) { if (branchTargetFinder.isSubroutineStart(offset)) { if (DEBUG) { System.out.println(" Replacing first subroutine instruction "+instruction.toString(offset)+" by a label"); } // Append a label at this offset instead of saving the subroutine // return address. codeAttributeComposer.appendLabel(offset); } else { // Append the instruction. codeAttributeComposer.appendInstruction(offset, instruction); } }
/** * Appends the code of the given code attribute. */ private void copyCode(Clazz clazz, Method method, CodeAttribute codeAttribute) { // The code may expand, due to expanding constant and variable // instructions. codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength); // Copy the instructions. codeAttribute.instructionsAccept(clazz, method, this); // Append a label just after the code. codeAttributeComposer.appendLabel(codeAttribute.u4codeLength); codeAttributeComposer.endCodeFragment(); }
/** * Appends the code of the given code attribute. */ private void copyCode(Clazz clazz, Method method, CodeAttribute codeAttribute) { // The code may expand, due to expanding constant and variable // instructions. codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength); // Copy the instructions. codeAttribute.instructionsAccept(clazz, method, this); // Copy the exceptions. codeAttribute.exceptionsAccept(clazz, method, exceptionInfoAdder); // Append a label just after the code. codeAttributeComposer.appendLabel(codeAttribute.u4codeLength); codeAttributeComposer.endCodeFragment(); }
codeAttributeComposer.appendLabel(offset);
codeAttributeComposer.appendLabel(offset);
codeAttributeComposer.appendLabel(offset);
codeAttributeComposer.appendLabel(offset); codeAttributeComposer.appendLabel(offset);
codeAttributeComposer.appendLabel(offset);
codeAttributeComposer.appendLabel(offset);
codeAttributeComposer.appendLabel(offset);
codeAttributeComposer.appendLabel(offset);
codeAttributeComposer.appendLabel(offset);
codeAttributeComposer.appendLabel(codeAttribute.u4codeLength);
codeAttributeComposer.appendLabel(codeAttribute.u4codeLength);
codeAttributeComposer.appendLabel(codeAttribute.u4codeLength);