/** * @param target branch target * @return the offset to `target' relative to this instruction */ protected int getTargetOffset(InstructionHandle target) { if (target == null) throw new ClassGenException("Target of " + super.toString(true) + " is invalid null handle"); int t = target.getPosition(); if (t < 0) throw new ClassGenException( "Invalid branch target position offset for " + super.toString(true) + ":" + t + ":" + target); return t - position; }