@Override public Op create(MethodLocation location, TIntObjectMap<MethodLocation> addressToLocation, VirtualMachine vm) { BuilderInstruction instruction = (BuilderInstruction) location.getInstruction(); Label target = ((BuilderOffsetInstruction) instruction).getTarget(); int targetAddress = target.getCodeAddress(); MethodLocation child = addressToLocation.get(targetAddress); return new GotoOp(location, child); } }
if (jumpInsn instanceof InsnWithOffset) { InsnWithOffset offsetInsn = (InsnWithOffset) jumpInsn; Integer targetOffset = labelsToOffsets.get(boj.getTarget()); if (targetOffset == null) { continue; if (Math.abs(distance) > offsetInsn.getMaxJumpOffset()) { insertIntermediateJump(labelsToIndex.get(boj.getTarget()), j, stmtV, instructions, labelAssigner); hasChanged = true; continue l0;
case PACKED_SWITCH: { MethodLocation targetLocation = ((BuilderOffsetInstruction) instruction).getTarget().getLocation(); BuilderInstruction targetInstruction = targetLocation.instruction; if (targetInstruction == null) { if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction) instruction).getTarget()); } else { replacement = new BuilderInstruction20t(Opcode.GOTO_16, ((BuilderOffsetInstruction) instruction).getTarget()); if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { BuilderOffsetInstruction replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction) instruction).getTarget()); replaceInstruction(location.index, replacement); madeChanges = true;
} else { BuilderOffsetInstruction original = (BuilderOffsetInstruction) manipulator.getInstruction(address); Label target = original.getTarget(); replacement = new BuilderInstruction30t(Opcode.GOTO_32, target);
case PACKED_SWITCH: { MethodLocation targetLocation = ((BuilderOffsetInstruction) instruction).getTarget().getLocation(); BuilderInstruction targetInstruction = targetLocation.instruction; if (targetInstruction == null) { if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction) instruction).getTarget()); } else { replacement = new BuilderInstruction20t(Opcode.GOTO_16, ((BuilderOffsetInstruction) instruction).getTarget()); if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { BuilderOffsetInstruction replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction) instruction).getTarget()); replaceInstruction(location.index, replacement); madeChanges = true;
case PACKED_SWITCH: { MethodLocation targetLocation = ((BuilderOffsetInstruction)instruction).getTarget().getLocation(); BuilderInstruction targetInstruction = targetLocation.instruction; if (targetInstruction == null) { if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction)instruction).getTarget()); } else { replacement = new BuilderInstruction20t(Opcode.GOTO_16, ((BuilderOffsetInstruction)instruction).getTarget()); if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { BuilderOffsetInstruction replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction)instruction).getTarget()); replaceInstruction(location.index, replacement); madeChanges = true;
case PACKED_SWITCH: { MethodLocation targetLocation = ((BuilderOffsetInstruction)instruction).getTarget().getLocation(); BuilderInstruction targetInstruction = targetLocation.instruction; if (targetInstruction == null) { if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction)instruction).getTarget()); } else { replacement = new BuilderInstruction20t(Opcode.GOTO_16, ((BuilderOffsetInstruction)instruction).getTarget()); if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { BuilderOffsetInstruction replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction)instruction).getTarget()); replaceInstruction(location.index, replacement); madeChanges = true;
case PACKED_SWITCH: { MethodLocation targetLocation = ((BuilderOffsetInstruction)instruction).getTarget().getLocation(); BuilderInstruction targetInstruction = targetLocation.instruction; if (targetInstruction == null) { if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction)instruction).getTarget()); } else { replacement = new BuilderInstruction20t(Opcode.GOTO_16, ((BuilderOffsetInstruction)instruction).getTarget()); if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) { BuilderOffsetInstruction replacement = new BuilderInstruction30t(Opcode.GOTO_32, ((BuilderOffsetInstruction)instruction).getTarget()); replaceInstruction(location.index, replacement); madeChanges = true;