/** * Returns the values of the specified matched jump offsets. */ protected int[] matchedJumpOffsets(int offset, int[] jumpOffsets) { // Special cases: are there any labels? for (int index = 0; index < jumpOffsets.length; index++) { if (isLabel(jumpOffsets[index])) { // Then make sure we reference a unique label, because // there may be other matching sequences. jumpOffsets[index] = uniqueLabel(jumpOffsets[index]); } } // Match any other jump offsets. return instructionSequenceMatcher.matchedJumpOffsets(offset, jumpOffsets); }
/** * Returns the values of the specified matched jump offsets. */ protected int[] matchedJumpOffsets(int offset, int[] jumpOffsets) { // Special cases: are there any labels? for (int index = 0; index < jumpOffsets.length; index++) { if (isLabel(jumpOffsets[index])) { // Then make sure we reference a unique label, because // there may be other matching sequences. jumpOffsets[index] = uniqueLabel(jumpOffsets[index]); } } // Match any other jump offsets. return instructionSequenceMatcher.matchedJumpOffsets(offset, jumpOffsets); }
/** * Returns the values of the specified matched jump offsets. */ protected int[] matchedJumpOffsets(int offset, int[] jumpOffsets) { // Special cases: are there any labels? for (int index = 0; index < jumpOffsets.length; index++) { if (isLabel(jumpOffsets[index])) { // Then make sure we reference a unique label, because // there may be other matching sequences. jumpOffsets[index] = uniqueLabel(jumpOffsets[index]); } } // Match any other jump offsets. return instructionSequenceMatcher.matchedJumpOffsets(offset, jumpOffsets); }
public void visitLookUpSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LookUpSwitchInstruction lookUpSwitchInstruction) { replacementInstruction = new LookUpSwitchInstruction(lookUpSwitchInstruction.opcode, instructionSequenceMatcher.matchedBranchOffset(offset, lookUpSwitchInstruction.defaultOffset), instructionSequenceMatcher.matchedArguments(lookUpSwitchInstruction.cases), instructionSequenceMatcher.matchedJumpOffsets(offset, lookUpSwitchInstruction.jumpOffsets)); } }
public void visitTableSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TableSwitchInstruction tableSwitchInstruction) { replacementInstruction = new TableSwitchInstruction(tableSwitchInstruction.opcode, instructionSequenceMatcher.matchedBranchOffset(offset, tableSwitchInstruction.defaultOffset), instructionSequenceMatcher.matchedArgument(tableSwitchInstruction.lowCase), instructionSequenceMatcher.matchedArgument(tableSwitchInstruction.highCase), instructionSequenceMatcher.matchedJumpOffsets(offset, tableSwitchInstruction.jumpOffsets)); }