1 instantiation of DagState
Microsoft.CodeAnalysis.CSharp (1)
Binder\DecisionDagBuilder.cs (1)
1842private static readonly ObjectPool<DagState> s_dagStatePool = new ObjectPool<DagState>(static () => new DagState());
49 references to DagState
Microsoft.CodeAnalysis.CSharp (49)
Binder\DecisionDagBuilder.cs (49)
42/// the initial state in a <see cref="DagState"/>, and then for each such state description we decide what the test 44/// represented by a <see cref="DagState"/> is a collection of partially matched cases represented by <see 45/// cref="StateForCase"/>. When we have computed <see cref="DagState"/> descriptions for all of the states, we 55private static readonly ObjectPool<PooledDictionary<DagState, DagState>> s_uniqueStatePool = 56PooledDictionary<DagState, DagState>.CreatePool(DagStateEquivalence.Instance); 742PooledDictionary<DagState, DagState> uniqueState = s_uniqueStatePool.Allocate(); 817Dictionary<DagState, DagState> uniqueState) 822using var workList = TemporaryArray<DagState>.Empty; 830DagState uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 832var state = DagState.GetInstance(cases, remainingValues); 833if (uniqueState.TryGetValue(state, out DagState? existingState)) 887var initialState = uniquifyState(new 895DagState state = workList.RemoveLast(); 973/// Compute the <see cref="BoundDecisionDag"/> corresponding to each <see cref="DagState"/> of the given <see cref="DecisionDag"/> 974/// and store it in <see cref="DagState.Dag"/>. 982bool wasAcyclic = decisionDag.TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> sortedStates); 1006var state = sortedStates[i]; 1072DagState state, 1087DagState state, 1413DagState state, 1616public readonly DagState RootNode; 1617public DecisionDag(DagState rootNode) 1625private static void AddSuccessor(ref TemporaryArray<DagState> builder, DagState state) 1634/// <param name="result">Topologically sorted <see cref="DagState"/> nodes.</param> 1636public bool TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> result) 1653var stateIdentifierMap = PooledDictionary<DagState, int>.GetInstance(); 1676foreach (DagState state in allStates) 1842private static readonly ObjectPool<DagState> s_dagStatePool = new ObjectPool<DagState>(static () => new DagState()); 1867public DagState? TrueBranch, FalseBranch; 1877/// Created an instance of <see cref="DagState"/>. Will take ownership of <paramref name="cases"/>. That 1881public static DagState GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 1883var dagState = s_dagStatePool.Allocate(); 1939private sealed class DagStateEquivalence : IEqualityComparer<DagState> 1945public bool Equals(DagState? x, DagState? y) 1964public int GetHashCode(DagState x) 2068DagState state, 2092DagState state, 2113DagState state, 2137DagState state, 2304DagState state, 2331DagState state,