1 instantiation of DagState
Microsoft.CodeAnalysis.CSharp (1)
Binder\DecisionDagBuilder.cs (1)
3022private static readonly ObjectPool<DagState> s_dagStatePool = new ObjectPool<DagState>(static () => new DagState());
68 references to DagState
Microsoft.CodeAnalysis.CSharp (68)
Binder\DecisionDagBuilder.cs (68)
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); 1217PooledDictionary<DagState, DagState> uniqueState = s_uniqueStatePool.Allocate(); 1293Dictionary<DagState, DagState> uniqueState) 1298using var workList = TemporaryArray<DagState>.Empty; 1306DagState uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 1308var state = DagState.GetInstance(cases, remainingValues); 1309if (uniqueState.TryGetValue(state, out DagState? existingState)) 1363var initialState = uniquifyState(new 1371DagState state = workList.RemoveLast(); 1434static DecisionDag removeUnnecessaryStates(DagState initialState, DecisionDag result) 1440if (result.TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> states)) 1444var stateToIndex = PooledDictionary<DagState, int>.GetInstance(); 1451DagState state = states[i]; 1453DagState? trueBranch = state.TrueBranch; 1454DagState? falseBranch = state.FalseBranch; 1605/// Compute the <see cref="BoundDecisionDag"/> corresponding to each <see cref="DagState"/> of the given <see cref="DecisionDag"/> 1606/// and store it in <see cref="DagState.Dag"/>. 1614bool wasAcyclic = decisionDag.TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> sortedStates); 1638var state = sortedStates[i]; 1704DagState state, 1719DagState state, 1922private FrozenArrayBuilder<StateForCase> RemoveEvaluation(DagState state, BoundDagEvaluation e) 2782public readonly DagState RootNode; 2783public DecisionDag(DagState rootNode) 2791private static void AddSuccessor(ref TemporaryArray<DagState> builder, DagState state) 2800/// <param name="result">Topologically sorted <see cref="DagState"/> nodes.</param> 2802public bool TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> result) 2819var stateIdentifierMap = PooledDictionary<DagState, int>.GetInstance(); 2856foreach (DagState state in allStates) 3022private static readonly ObjectPool<DagState> s_dagStatePool = new ObjectPool<DagState>(static () => new DagState()); 3047public DagState? TrueBranch, FalseBranch; 3057/// Created an instance of <see cref="DagState"/>. Will take ownership of <paramref name="cases"/>. That 3061public static DagState GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 3063var dagState = s_dagStatePool.Allocate(); 3119private sealed class DagStateEquivalence : IEqualityComparer<DagState> 3125public bool Equals(DagState? x, DagState? y) 3144public int GetHashCode(DagState x) 3250DagState state, 3287protected abstract RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e); 3289public Tests RemoveEvaluation(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, BoundDagEvaluation e) 3294protected Tests RemoveEvaluationAndUpdateTempReferences(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3393DagState state, 3403protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3417DagState state, 3427protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3444DagState state, 3574protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3658static Tests removeEvaluation(One tests, DecisionDagBuilder builder, DagState state, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e, out Tests? condition) 3697DagState state, 3867private static Tests RemoveIndexerEvaluation(One tests, DecisionDagBuilder dagBuilder, DagState state, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagIndexerEvaluation s1, out Tests? condition) 4055DagState state, 4156DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, 4209protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 4224DagState state, 4251DagState state, 4330protected sealed override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e)