1 instantiation of DagState
Microsoft.CodeAnalysis.CSharp (1)
Binder\DecisionDagBuilder.cs (1)
2112private static readonly ObjectPool<DagState> s_dagStatePool = new ObjectPool<DagState>(static () => new DagState());
65 references to DagState
Microsoft.CodeAnalysis.CSharp (65)
Binder\DecisionDagBuilder.cs (65)
41/// the initial state in a <see cref="DagState"/>, and then for each such state description we decide what the test 43/// represented by a <see cref="DagState"/> is a collection of partially matched cases represented by <see 44/// cref="StateForCase"/>. When we have computed <see cref="DagState"/> descriptions for all of the states, we 54private static readonly ObjectPool<PooledDictionary<DagState, DagState>> s_uniqueStatePool = 55PooledDictionary<DagState, DagState>.CreatePool(DagStateEquivalence.Instance); 794PooledDictionary<DagState, DagState> uniqueState = s_uniqueStatePool.Allocate(); 870Dictionary<DagState, DagState> uniqueState) 875using var workList = TemporaryArray<DagState>.Empty; 883DagState uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 885var state = DagState.GetInstance(cases, remainingValues); 886if (uniqueState.TryGetValue(state, out DagState? existingState)) 940var initialState = uniquifyState(new 948DagState state = workList.RemoveLast(); 1011static DecisionDag removeUnnecessaryStates(DagState initialState, DecisionDag result) 1017if (result.TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> states)) 1021var stateToIndex = PooledDictionary<DagState, int>.GetInstance(); 1028DagState state = states[i]; 1030DagState? trueBranch = state.TrueBranch; 1031DagState? falseBranch = state.FalseBranch; 1182/// Compute the <see cref="BoundDecisionDag"/> corresponding to each <see cref="DagState"/> of the given <see cref="DecisionDag"/> 1183/// and store it in <see cref="DagState.Dag"/>. 1191bool wasAcyclic = decisionDag.TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> sortedStates); 1215var state = sortedStates[i]; 1281DagState state, 1296DagState state, 1417private FrozenArrayBuilder<StateForCase> RemoveEvaluation(DagState state, BoundDagEvaluation e) 1886public readonly DagState RootNode; 1887public DecisionDag(DagState rootNode) 1895private static void AddSuccessor(ref TemporaryArray<DagState> builder, DagState state) 1904/// <param name="result">Topologically sorted <see cref="DagState"/> nodes.</param> 1906public bool TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> result) 1923var stateIdentifierMap = PooledDictionary<DagState, int>.GetInstance(); 1946foreach (DagState state in allStates) 2112private static readonly ObjectPool<DagState> s_dagStatePool = new ObjectPool<DagState>(static () => new DagState()); 2137public DagState? TrueBranch, FalseBranch; 2147/// Created an instance of <see cref="DagState"/>. Will take ownership of <paramref name="cases"/>. That 2151public static DagState GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 2153var dagState = s_dagStatePool.Allocate(); 2209private sealed class DagStateEquivalence : IEqualityComparer<DagState> 2215public bool Equals(DagState? x, DagState? y) 2234public int GetHashCode(DagState x) 2338DagState state, 2375protected abstract RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e); 2377public Tests RemoveEvaluation(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, BoundDagEvaluation e) 2382protected Tests RemoveEvaluationAndUpdateTempReferences(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 2481DagState state, 2491protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 2505DagState state, 2515protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 2532DagState state, 2632protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 2691public static Tests RemoveEvaluation(One tests, DecisionDagBuilder builder, DagState state, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e, out Tests? condition) 2827private static Tests RemoveIndexerEvaluation(One tests, DecisionDagBuilder dagBuilder, DagState state, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagIndexerEvaluation s1, out Tests? condition) 3011protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3026DagState state, 3053DagState state, 3132protected sealed override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e)