/** * JumpInstructions are equal if they represent the same operation and * the instruction they jump to is the * same, or if the jump Instruction of either is unset. */ public boolean equalsInstruction(Instruction other) { if (this == other) return true; if (!super.equalsInstruction(other)) return false; Instruction target = ((JumpInstruction) other).getTarget(); return target == null || getTarget() == null || target == getTarget(); }
/** * JumpInstructions are equal if they represent the same operation and * the instruction they jump to is the * same, or if the jump Instruction of either is unset. */ public boolean equalsInstruction(Instruction other) { if (this == other) return true; if (!super.equalsInstruction(other)) return false; Instruction target = ((JumpInstruction) other).getTarget(); return target == null || getTarget() == null || target == getTarget(); }