/// <summary> /// Checks whether the fdef has a redefinition from the current not to the end of the method /// </summary> /// <param name="fdef"></param> /// <param name="otherDefinedOffsets"></param> /// <returns></returns> private bool HasRedefinition(DUCoverStore dcs, FieldDefUseStore fdef, HashSet <int> otherDefinedOffsets) { DEFUSE_FEASIBILITY_TYPE feasibilityVal; if (this.feasibilityDicCache.TryGetValue(fdef, out feasibilityVal)) { if (feasibilityVal == DEFUSE_FEASIBILITY_TYPE.DEF_FEASIBLE) { return(false); } else { return(true); } } InstructionGraph ig = dcs.GetInstructionGraph(fdef.Method); DepthFirstTraversal dft = new DepthFirstTraversal(ig); InstructionVertex iv = ig.GetVertex(fdef.Offset); var result = dft.HasDefClearPathToEnd(iv, otherDefinedOffsets); if (result) { this.feasibilityDicCache[fdef] = DEFUSE_FEASIBILITY_TYPE.DEF_FEASIBLE; } else { this.feasibilityDicCache[fdef] = DEFUSE_FEASIBILITY_TYPE.DEF_INFEASIBLE; } return(!result); }