1 instantiation of DagState
Microsoft.CodeAnalysis.CSharp (1)
Binder\DecisionDagBuilder.cs (1)
1846
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);
742
PooledDictionary<
DagState
,
DagState
> uniqueState = s_uniqueStatePool.Allocate();
817
Dictionary<
DagState
,
DagState
> uniqueState)
822
using var workList = TemporaryArray<
DagState
>.Empty;
830
DagState
uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues)
832
var
state =
DagState
.GetInstance(cases, remainingValues);
833
if (uniqueState.TryGetValue(state, out
DagState
? existingState))
887
var
initialState = uniquifyState(new
895
DagState
state = workList.RemoveLast();
973
/// Compute the <see cref="BoundDecisionDag"/> corresponding to each <see cref="
DagState
"/> of the given <see cref="DecisionDag"/>
974
/// and store it in <see cref="
DagState
.Dag"/>.
982
bool wasAcyclic = decisionDag.TryGetTopologicallySortedReachableStates(out ImmutableArray<
DagState
> sortedStates);
1006
var
state = sortedStates[i];
1072
DagState
state,
1087
DagState
state,
1413
DagState
state,
1620
public readonly
DagState
RootNode;
1621
public DecisionDag(
DagState
rootNode)
1629
private static void AddSuccessor(ref TemporaryArray<
DagState
> builder,
DagState
state)
1638
/// <param name="result">Topologically sorted <see cref="
DagState
"/> nodes.</param>
1640
public bool TryGetTopologicallySortedReachableStates(out ImmutableArray<
DagState
> result)
1657
var stateIdentifierMap = PooledDictionary<
DagState
, int>.GetInstance();
1680
foreach (
DagState
state in allStates)
1846
private static readonly ObjectPool<
DagState
> s_dagStatePool = new ObjectPool<
DagState
>(static () => new DagState());
1871
public
DagState
? TrueBranch, FalseBranch;
1881
/// Created an instance of <see cref="
DagState
"/>. Will take ownership of <paramref name="cases"/>. That
1885
public static
DagState
GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues)
1887
var
dagState = s_dagStatePool.Allocate();
1943
private sealed class DagStateEquivalence : IEqualityComparer<
DagState
>
1949
public bool Equals(
DagState
? x,
DagState
? y)
1968
public int GetHashCode(
DagState
x)
2072
DagState
state,
2096
DagState
state,
2117
DagState
state,
2141
DagState
state,
2308
DagState
state,
2335
DagState
state,