@Override public DfaInstructionState[] visitInstanceof( InstanceofInstruction instruction, DataFlowRunner runner, DfaMemoryState memState) { memState.pop(); memState.pop(); memState.push( new DfaInstanceofValue( runner.getFactory(), instruction.getLeft(), instruction.getCastType())); return new DfaInstructionState[] { new DfaInstructionState(runner.getInstruction(instruction.getIndex() + 1), memState) }; }
public boolean isInstanceofRedundant(InstanceofInstruction instruction) { return !myUsefulInstanceofs.contains(instruction) && !instruction.isConditionConst() && myReachable.contains(instruction); }