/** * Adjusts the given jump offsets for the instruction at the given offset. */ private void updateJumpOffsets(int offset, int[] jumpOffsets) { for (int index = 0; index < jumpOffsets.length; index++) { jumpOffsets[index] = newBranchOffset(offset, jumpOffsets[index]); } }
/** * Adjusts the given jump offsets for the instruction at the given offset. */ private void updateJumpOffsets(int offset, int[] jumpOffsets) { for (int index = 0; index < jumpOffsets.length; index++) { jumpOffsets[index] = newBranchOffset(offset, jumpOffsets[index]); } }
/** * Adjusts the given jump offsets for the instruction at the given offset. */ private void updateJumpOffsets(int offset, int[] jumpOffsets) { for (int index = 0; index < jumpOffsets.length; index++) { jumpOffsets[index] = newBranchOffset(offset, jumpOffsets[index]); } }
public void visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction) { try { // Adjust the branch offset. branchInstruction.branchOffset = newBranchOffset(offset, branchInstruction.branchOffset); // Don't remap this instruction again. oldInstructionOffsets[offset] = -1; } catch (IllegalArgumentException e) { if (level == 0 || !allowExternalBranchTargets) { throw e; } } }
public void visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction) { try { // Adjust the branch offset. branchInstruction.branchOffset = newBranchOffset(offset, branchInstruction.branchOffset); // Don't remap this instruction again. oldInstructionOffsets[offset] = -1; } catch (IllegalArgumentException e) { if (level == 0 || !allowExternalBranchTargets) { throw e; } } }
public void visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction) { try { // Adjust the branch offset. branchInstruction.branchOffset = newBranchOffset(offset, branchInstruction.branchOffset); // Don't remap this instruction again. oldInstructionOffsets[offset] = -1; } catch (IllegalArgumentException e) { if (level == 0 || !allowExternalBranchTargets) { throw e; } } }
public void visitAnySwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SwitchInstruction switchInstruction) { try { // TODO: We're assuming we can adjust no offsets or all offsets at once. // Adjust the default jump offset. switchInstruction.defaultOffset = newBranchOffset(offset, switchInstruction.defaultOffset); // Adjust the jump offsets. updateJumpOffsets(offset, switchInstruction.jumpOffsets); // Don't remap this instruction again. oldInstructionOffsets[offset] = -1; } catch (IllegalArgumentException e) { if (level == 0 || !allowExternalBranchTargets) { throw e; } } }
public void visitAnySwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SwitchInstruction switchInstruction) { try { // TODO: We're assuming we can adjust no offsets or all offsets at once. // Adjust the default jump offset. switchInstruction.defaultOffset = newBranchOffset(offset, switchInstruction.defaultOffset); // Adjust the jump offsets. updateJumpOffsets(offset, switchInstruction.jumpOffsets); // Don't remap this instruction again. oldInstructionOffsets[offset] = -1; } catch (IllegalArgumentException e) { if (level == 0 || !allowExternalBranchTargets) { throw e; } } }
public void visitAnySwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SwitchInstruction switchInstruction) { try { // TODO: We're assuming we can adjust no offsets or all offsets at once. // Adjust the default jump offset. switchInstruction.defaultOffset = newBranchOffset(offset, switchInstruction.defaultOffset); // Adjust the jump offsets. updateJumpOffsets(offset, switchInstruction.jumpOffsets); // Don't remap this instruction again. oldInstructionOffsets[offset] = -1; } catch (IllegalArgumentException e) { if (level == 0 || !allowExternalBranchTargets) { throw e; } } }