1 instantiation of DagState
Microsoft.CodeAnalysis.CSharp (1)
Binder\DecisionDagBuilder.cs (1)
3023private static readonly ObjectPool<DagState> s_dagStatePool = new ObjectPool<DagState>(static () => new DagState());
66 references to DagState
Microsoft.CodeAnalysis.CSharp (66)
Binder\DecisionDagBuilder.cs (66)
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); 1218PooledDictionary<DagState, DagState> uniqueState = s_uniqueStatePool.Allocate(); 1294Dictionary<DagState, DagState> uniqueState) 1299using var workList = TemporaryArray<DagState>.Empty; 1307DagState uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 1309var state = DagState.GetInstance(cases, remainingValues); 1310if (uniqueState.TryGetValue(state, out DagState? existingState)) 1364var initialState = uniquifyState(new 1372DagState state = workList.RemoveLast(); 1435static DecisionDag removeUnnecessaryStates(DagState initialState, DecisionDag result) 1441if (result.TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> states)) 1445var stateToIndex = PooledDictionary<DagState, int>.GetInstance(); 1452DagState state = states[i]; 1454DagState? trueBranch = state.TrueBranch; 1455DagState? falseBranch = state.FalseBranch; 1606/// Compute the <see cref="BoundDecisionDag"/> corresponding to each <see cref="DagState"/> of the given <see cref="DecisionDag"/> 1607/// and store it in <see cref="DagState.Dag"/>. 1615bool wasAcyclic = decisionDag.TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> sortedStates); 1639var state = sortedStates[i]; 1705DagState state, 1720DagState state, 1923private FrozenArrayBuilder<StateForCase> RemoveEvaluation(DagState state, BoundDagEvaluation e) 2783public readonly DagState RootNode; 2784public DecisionDag(DagState rootNode) 2792private static void AddSuccessor(ref TemporaryArray<DagState> builder, DagState state) 2801/// <param name="result">Topologically sorted <see cref="DagState"/> nodes.</param> 2803public bool TryGetTopologicallySortedReachableStates(out ImmutableArray<DagState> result) 3023private static readonly ObjectPool<DagState> s_dagStatePool = new ObjectPool<DagState>(static () => new DagState()); 3048public DagState? TrueBranch, FalseBranch; 3058/// Created an instance of <see cref="DagState"/>. Will take ownership of <paramref name="cases"/>. That 3062public static DagState GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 3064var dagState = s_dagStatePool.Allocate(); 3120private sealed class DagStateEquivalence : IEqualityComparer<DagState> 3126public bool Equals(DagState? x, DagState? y) 3145public int GetHashCode(DagState x) 3251DagState state, 3288protected abstract RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e); 3290public Tests RemoveEvaluation(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, BoundDagEvaluation e) 3295protected Tests RemoveEvaluationAndUpdateTempReferences(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3394DagState state, 3404protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3418DagState state, 3428protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3445DagState state, 3575protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3659static Tests removeEvaluation(One tests, DecisionDagBuilder builder, DagState state, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e, out Tests? condition) 3698DagState state, 3868private static Tests RemoveIndexerEvaluation(One tests, DecisionDagBuilder dagBuilder, DagState state, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagIndexerEvaluation s1, out Tests? condition) 4056DagState state, 4157DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, 4210protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 4225DagState state, 4252DagState state, 4331protected sealed override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e)