1 instantiation of DagState
Microsoft.CodeAnalysis.CSharp (1)
Binder\DecisionDagBuilder.cs (1)
1844
private static readonly ObjectPool<DagState> s_dagStatePool = new ObjectPool<DagState>(static () => new
DagState
());
48 references to DagState
Microsoft.CodeAnalysis.CSharp (48)
Binder\DecisionDagBuilder.cs (48)
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);
740
PooledDictionary<
DagState
,
DagState
> uniqueState = s_uniqueStatePool.Allocate();
815
Dictionary<
DagState
,
DagState
> uniqueState)
820
using var workList = TemporaryArray<
DagState
>.Empty;
828
DagState
uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues)
830
var
state =
DagState
.GetInstance(cases, remainingValues);
831
if (uniqueState.TryGetValue(state, out
DagState
? existingState))
885
var
initialState = uniquifyState(new
893
DagState
state = workList.RemoveLast();
971
/// Compute the <see cref="BoundDecisionDag"/> corresponding to each <see cref="
DagState
"/> of the given <see cref="DecisionDag"/>
972
/// and store it in <see cref="
DagState
.Dag"/>.
980
bool wasAcyclic = decisionDag.TryGetTopologicallySortedReachableStates(out ImmutableArray<
DagState
> sortedStates);
1004
var
state = sortedStates[i];
1070
DagState
state,
1085
DagState
state,
1411
DagState
state,
1618
public readonly
DagState
RootNode;
1619
public DecisionDag(
DagState
rootNode)
1627
private static void AddSuccessor(ref TemporaryArray<
DagState
> builder,
DagState
state)
1636
/// <param name="result">Topologically sorted <see cref="
DagState
"/> nodes.</param>
1638
public bool TryGetTopologicallySortedReachableStates(out ImmutableArray<
DagState
> result)
1655
var stateIdentifierMap = PooledDictionary<
DagState
, int>.GetInstance();
1678
foreach (
DagState
state in allStates)
1844
private static readonly ObjectPool<
DagState
> s_dagStatePool = new ObjectPool<
DagState
>(static () => new DagState());
1869
public
DagState
? TrueBranch, FalseBranch;
1879
/// Created an instance of <see cref="
DagState
"/>. Will take ownership of <paramref name="cases"/>. That
1883
public static
DagState
GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues)
1941
private sealed class DagStateEquivalence : IEqualityComparer<
DagState
>
1947
public bool Equals(
DagState
? x,
DagState
? y)
1966
public int GetHashCode(
DagState
x)
2070
DagState
state,
2094
DagState
state,
2115
DagState
state,
2139
DagState
state,
2306
DagState
state,
2333
DagState
state,