/** * Makes the given label identifier or offset unique for the current * matching instruction sequence. */ private int uniqueLabel(int labelIdentifier) { return labelIdentifier | (instructionSequenceMatcher.matchedInstructionOffset(0) << 8); }
/** * Makes the given label identifier or offset unique for the current * matching instruction sequence. */ private int uniqueLabel(int labelIdentifier) { return labelIdentifier | (instructionSequenceMatcher.matchedInstructionOffset(0) << 8); }
/** * Makes the given label identifier or offset unique for the current * matching instruction sequence. */ private int uniqueLabel(int labelIdentifier) { return labelIdentifier | (instructionSequenceMatcher.matchedInstructionOffset(0) << 8); }
/** * Returns whether the matched pattern instructions haven't been modified * before. */ private boolean matchedInstructionsUnmodified() { for (int index = 0; index < instructionSequenceMatcher.instructionCount(); index++) { if (codeAttributeEditor.isModified(instructionSequenceMatcher.matchedInstructionOffset(index))) { return false; } } return true; }
/** * Returns whether the matched pattern instructions haven't been modified * before. */ private boolean matchedInstructionsUnmodified() { for (int index = 0; index < instructionSequenceMatcher.instructionCount(); index++) { if (codeAttributeEditor.isModified(instructionSequenceMatcher.matchedInstructionOffset(index))) { return false; } } return true; }
/** * Creates the replacement instruction for the given index in the * instruction sequence. */ public Instruction create(int index) { // Create the instruction. replacementInstructions[index].accept(null, null, null, instructionSequenceMatcher.matchedInstructionOffset(index), this); // Return it. return replacementInstruction.shrink(); }
/** * Returns whether the matched pattern instructions haven't been modified * before. */ private boolean matchedInstructionsUnmodified() { for (int index = 0; index < instructionSequenceMatcher.instructionCount(); index++) { if (codeAttributeEditor.isModified(instructionSequenceMatcher.matchedInstructionOffset(index))) { return false; } } return true; }
/** * Returns whether the matched pattern instructions haven't been modified * before. */ private boolean matchedInstructionsUnmodified() { for (int index = 0; index < instructionSequenceMatcher.instructionCount(); index++) { if (codeAttributeEditor.isModified(instructionSequenceMatcher.matchedInstructionOffset(index))) { return false; } } return true; }
/** * Creates the replacement instruction for the given index in the * instruction sequence. */ public Instruction create(Clazz clazz, CodeAttribute codeAttribute, int index) { int matchedInstructionIndex = index < instructionSequenceMatcher.instructionCount() ? index : instructionSequenceMatcher.instructionCount() - 1; int matchedInstructionOffset = instructionSequenceMatcher.matchedInstructionOffset(matchedInstructionIndex); // Create the instruction. replacementInstructions[index].accept(clazz, null, codeAttribute, matchedInstructionOffset, this); // Return it. return replacementInstruction; }
/** * Creates the replacement instruction for the given index in the * instruction sequence. */ public Instruction create(Clazz clazz, CodeAttribute codeAttribute, int index) { int matchedInstructionIndex = index < instructionSequenceMatcher.instructionCount() ? index : instructionSequenceMatcher.instructionCount() - 1; int matchedInstructionOffset = instructionSequenceMatcher.matchedInstructionOffset(matchedInstructionIndex); // Create the instruction. replacementInstructions[index].accept(clazz, null, codeAttribute, matchedInstructionOffset, this); // Return it. return replacementInstruction; }
/** * Creates the replacement instruction for the given index in the * instruction sequence. */ public Instruction create(Clazz clazz, CodeAttribute codeAttribute, int index) { int matchedInstructionIndex = index < instructionSequenceMatcher.instructionCount() ? index : instructionSequenceMatcher.instructionCount() - 1; int matchedInstructionOffset = instructionSequenceMatcher.matchedInstructionOffset(matchedInstructionIndex); // Create the instruction. replacementInstructions[index].accept(clazz, null, codeAttribute, matchedInstructionOffset, this); // Return it. return replacementInstruction; }
codeAttributeEditor.replaceInstruction(instructionSequenceMatcher.matchedInstructionOffset(index), replacementInstructionFactory.create(clazz, codeAttribute, index)); codeAttributeEditor.deleteInstruction(instructionSequenceMatcher.matchedInstructionOffset(index)); codeAttributeEditor.replaceInstruction(instructionSequenceMatcher.matchedInstructionOffset(index), replacementInstructionFactory.create(clazz, codeAttribute, index)); codeAttributeEditor.insertAfterInstruction(instructionSequenceMatcher.matchedInstructionOffset(patternCount - 1), extraInstructions);
codeAttributeEditor.replaceInstruction(instructionSequenceMatcher.matchedInstructionOffset(index), replacementInstructionFactory.create(clazz, codeAttribute, index)); codeAttributeEditor.deleteInstruction(instructionSequenceMatcher.matchedInstructionOffset(index)); codeAttributeEditor.replaceInstruction(instructionSequenceMatcher.matchedInstructionOffset(index), replacementInstructionFactory.create(clazz, codeAttribute, index)); codeAttributeEditor.insertAfterInstruction(instructionSequenceMatcher.matchedInstructionOffset(patternCount - 1), extraInstructions);
for (int index = 0; index < replacementInstructions.length; index++) int matchedOffset = instructionSequenceMatcher.matchedInstructionOffset(index); System.out.println(" "+replacementInstructionFactory.create(index).shrink().toString(matchedOffset)); codeAttributeEditor.replaceInstruction(instructionSequenceMatcher.matchedInstructionOffset(index), replacementInstructionFactory.create(index).shrink()); codeAttributeEditor.deleteInstruction(instructionSequenceMatcher.matchedInstructionOffset(index));
return arrayPreStoreMatcher.matchedInstructionOffset(instructionCount - 1);
return arrayPreStoreMatcher.matchedInstructionOffset(instructionCount - 1);
return arrayPreStoreMatcher.matchedInstructionOffset(instructionCount - 1);
constantSequenceMatcher.matchedInstructionOffset( constantSequenceMatcher.instructionCount() - 2);
constantSequenceMatcher.matchedInstructionOffset( constantSequenceMatcher.instructionCount() - 2);
constantSequenceMatcher.matchedInstructionOffset( constantSequenceMatcher.instructionCount() - 2);