コード例 #1
0
 @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)
   };
 }
コード例 #2
0
 public boolean isInstanceofRedundant(InstanceofInstruction instruction) {
   return !myUsefulInstanceofs.contains(instruction)
       && !instruction.isConditionConst()
       && myReachable.contains(instruction);
 }