1 instantiation of DagState
Microsoft.CodeAnalysis.CSharp (1)
Binder\DecisionDagBuilder.cs (1)
1888
private 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
55
private static readonly ObjectPool<PooledDictionary<
DagState
,
DagState
>> s_uniqueStatePool =
56
PooledDictionary<
DagState
,
DagState
>.CreatePool(DagStateEquivalence.Instance);
788
PooledDictionary<
DagState
,
DagState
> uniqueState = s_uniqueStatePool.Allocate();
863
Dictionary<
DagState
,
DagState
> uniqueState)
868
using var workList = TemporaryArray<
DagState
>.Empty;
876
DagState
uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues)
878
var
state =
DagState
.GetInstance(cases, remainingValues);
879
if (uniqueState.TryGetValue(state, out
DagState
? existingState))
933
var
initialState = uniquifyState(new
941
DagState
state = workList.RemoveLast();
1019
/// Compute the <see cref="BoundDecisionDag"/> corresponding to each <see cref="
DagState
"/> of the given <see cref="DecisionDag"/>
1020
/// and store it in <see cref="
DagState
.Dag"/>.
1028
bool wasAcyclic = decisionDag.TryGetTopologicallySortedReachableStates(out ImmutableArray<
DagState
> sortedStates);
1052
var
state = sortedStates[i];
1118
DagState
state,
1133
DagState
state,
1459
DagState
state,
1662
public readonly
DagState
RootNode;
1663
public DecisionDag(
DagState
rootNode)
1671
private static void AddSuccessor(ref TemporaryArray<
DagState
> builder,
DagState
state)
1680
/// <param name="result">Topologically sorted <see cref="
DagState
"/> nodes.</param>
1682
public bool TryGetTopologicallySortedReachableStates(out ImmutableArray<
DagState
> result)
1699
var stateIdentifierMap = PooledDictionary<
DagState
, int>.GetInstance();
1722
foreach (
DagState
state in allStates)
1888
private static readonly ObjectPool<
DagState
> s_dagStatePool = new ObjectPool<
DagState
>(static () => new DagState());
1913
public
DagState
? TrueBranch, FalseBranch;
1923
/// Created an instance of <see cref="
DagState
"/>. Will take ownership of <paramref name="cases"/>. That
1927
public static
DagState
GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues)
1929
var
dagState = s_dagStatePool.Allocate();
1985
private sealed class DagStateEquivalence : IEqualityComparer<
DagState
>
1991
public bool Equals(
DagState
? x,
DagState
? y)
2010
public int GetHashCode(
DagState
x)
2114
DagState
state,
2138
DagState
state,
2159
DagState
state,
2183
DagState
state,
2350
DagState
state,
2377
DagState
state,