12 instantiations of BoundDagTemp
Microsoft.CodeAnalysis.CSharp (12)
BoundTree\BoundDagEvaluation.cs (9)
135
return new
BoundDagTemp
(Syntax, Type, this);
162
return new
BoundDagTemp
(Syntax, Field.Type, this);
176
return new
BoundDagTemp
(Syntax, Property.Type, this);
199
return new
BoundDagTemp
(Syntax, Property.Type, this);
230
return new
BoundDagTemp
(Syntax, IndexerType, this);
267
return new
BoundDagTemp
(Syntax, SliceType, this);
328
builder.Add(new
BoundDagTemp
(Syntax, parameter.Type, this, i));
340
return new
BoundDagTemp
(Syntax, parameter.Type, this, 0);
346
return new
BoundDagTemp
(Syntax, DeconstructMethod.ReturnType, this, index: -1);
BoundTree\BoundDagTemp.cs (1)
22
public static BoundDagTemp ForOriginalInput(SyntaxNode syntax, TypeSymbol type) => new
BoundDagTemp
(syntax, type, source: null, 0);
BoundTree\Constructors.cs (1)
649
public static BoundDagTemp ForOriginalInput(BoundExpression expr) => new
BoundDagTemp
(expr.Syntax, expr.Type!, source: null);
Generated\BoundNodes.xml.Generated.cs (1)
5262
var result = new
BoundDagTemp
(this.Syntax, type, source, index, this.HasErrors);
460 references to BoundDagTemp
Microsoft.CodeAnalysis.CSharp (460)
Binder\DecisionDagBuilder_CheckOrReachability.cs (9)
76
BoundDagTemp
rootIdentifier =
BoundDagTemp
.ForOriginalInput(inputExpression);
166
BoundDagTemp
rootIdentifier =
BoundDagTemp
.ForOriginalInput(inputExpression);
241
BoundDagTemp
rootIdentifier =
BoundDagTemp
.ForOriginalInput(inputExpression);
368
public readonly
BoundDagTemp
RootIdentifier;
375
DecisionDagBuilder builder,
BoundDagTemp
rootIdentifier, SyntaxNode syntax, PooledHashSet<SyntaxNode> redundantNodes)
413
BoundDagTemp
rootIdentifier,
Binder\DecisionDagBuilder_ListPatterns.cs (6)
31
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
42
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
48
var
lengthTemp = lengthEvaluation.MakeResultTemp();
72
var
sliceTemp = sliceEvaluation.MakeResultTemp();
87
var
indexTemp = indexEvaluation.MakeResultTemp();
94
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
Binder\DecisionDagBuilder.cs (214)
136
var
rootIdentifier =
BoundDagTemp
.ForOriginalInput(inputExpression);
149
var
rootIdentifier =
BoundDagTemp
.ForOriginalInput(switchGoverningExpression);
174
var
rootIdentifier =
BoundDagTemp
.ForOriginalInput(switchExpressionInput);
191
BoundDagTemp
input,
207
BoundDagTemp
input,
228
BoundDagTemp
temp = binding.TempContainingValue;
332
BoundDagTemp
input,
339
private readonly struct TestInputOutputInfo(
BoundDagTemp
dagTemp, BoundPropertySubpatternMember? unionValue)
341
public readonly
BoundDagTemp
DagTemp = dagTemp;
344
public static explicit operator TestInputOutputInfo(
BoundDagTemp
dagTemp)
349
public static explicit operator
BoundDagTemp
(TestInputOutputInfo info)
421
private
BoundDagTemp
PrepareForUnionValuePropertyMatching(ref TestInputOutputInfo input, ArrayBuilder<Tests> tests)
426
BoundDagTemp
temp = MakeUnionValue(input.DagTemp, unionValue, out BoundDagEvaluation valueEvaluation);
431
return (
BoundDagTemp
)input;
434
private
BoundDagTemp
MakeUnionValue(
BoundDagTemp
input, BoundPropertySubpatternMember unionValue, out BoundDagEvaluation valueEvaluation)
439
var
result = valueEvaluation.MakeResultTemp();
445
internal static bool IsUnionValue(
BoundDagTemp
input, [NotNullWhen(true)] out
BoundDagTemp
? unionInstance)
473
internal static bool IsUnionValueEvaluation(BoundDagEvaluation? source, [NotNullWhen(true)] out
BoundDagTemp
? unionInstance)
515
var
valueAsITuple = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
520
var
lengthTemp = lengthEvaluation.MakeResultTemp();
523
var
getItemPropertyInput = OriginalInput(valueAsITuple, getItemProperty);
528
var
indexTemp = indexEvaluation.MakeResultTemp();
541
private
BoundDagTemp
OriginalInput(
BoundDagTemp
input, Symbol symbol)
565
internal static
BoundDagTemp
OriginalInput(
BoundDagTemp
input)
602
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
627
BoundDagTemp
input,
641
private static bool IsUnionTryGetValueReturn(
BoundDagTemp
input, [NotNullWhen(true)] out TypeSymbol? targetType, [NotNullWhen(true)] out
BoundDagTemp
? unionInstance, [NotNullWhen(true)] out BoundDagDeconstructEvaluation? tryGetValueEvaluation)
666
internal static bool IsUnionTryGetValueEvaluation([NotNullWhen(true)] BoundDagEvaluation? evaluation, [NotNullWhen(true)] out TypeSymbol? targetType, [NotNullWhen(true)] out
BoundDagTemp
? unionInstance)
693
internal static bool IsUnionTryGetValueValue(
BoundDagTemp
input, [NotNullWhen(true)] out
BoundDagTemp
? unionInstance)
715
private static bool IsUnionHasValue(
BoundDagTemp
input, [NotNullWhen(true)] out
BoundDagTemp
? unionInstance)
758
var
temp = hasValueEvaluation.MakeResultTemp();
803
var
boolResult = deconstructEvaluation.MakeReturnValueTemp();
811
var
outParameterTemp = deconstructEvaluation.MakeFirstOutParameterTemp();
818
BoundDagTemp
typeEvaluationTemp = typeEvaluation.MakeResultTemp();
837
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
881
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, builder);
897
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
911
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
919
private static Tests MakeConstantTest(SyntaxNode syntax,
BoundDagTemp
input, ConstantValue constantValue)
950
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
955
ArrayBuilder<
BoundDagTemp
> outParamTemps = evaluation.MakeOutParameterTemps();
979
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
985
var
element = evaluation.MakeResultTemp();
994
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
1004
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
1006
BoundDagTemp
currentInput = input;
1037
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, tests);
1045
bool tryMakeTestsForSubpatternMemberReceiver(BoundPropertySubpattern subpattern, BoundPropertySubpatternMember member, ref
BoundDagTemp
input)
1053
input = (
BoundDagTemp
)MakeConvertToType((TestInputOutputInfo)input, member.Syntax, member.Receiver.Type.StrippedType(), isExplicitTest: false, tests);
1064
bool tryMakeTestsForSubpatternMember(BoundPropertySubpattern subpattern, [NotNullWhen(true)] BoundPropertySubpatternMember? member, ref
BoundDagTemp
input, bool isLengthOrCount)
1159
BoundDagTemp
input = PrepareForUnionValuePropertyMatching(ref inputInfo, builder);
1190
BoundDagTemp
output = PrepareForUnionValuePropertyMatching(ref outputInfo, tests);
1307
DagState uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<
BoundDagTemp
, IValueSet> remainingValues)
1320
var newRemainingValues = ImmutableDictionary.CreateBuilder<
BoundDagTemp
, IValueSet>();
1366
ImmutableDictionary<
BoundDagTemp
, IValueSet>.Empty);
1443
var tempToIndex = PooledDictionary<
BoundDagTemp
, int>.GetInstance();
1520
OneOrMany<
BoundDagTemp
> outputs = eval.AllOutputs();
1523
foreach (
var
temp in outputs)
1576
static void markTempsUsedInBindings(PooledDictionary<
BoundDagTemp
, int> tempToIndex, ref int nextTempIndex, ref BitVector usedTemps, StateForCase stateForCase)
1584
static void markUsedTemp(PooledDictionary<
BoundDagTemp
, int> tempToIndex, ref int nextTempIndex, ref BitVector usedTemps,
BoundDagTemp
temp)
1596
static void markAllInputsUsed(PooledDictionary<
BoundDagTemp
, int> tempToIndex, ref int nextTempIndex, ref BitVector usedTemps, BoundDagTest test)
1598
foreach (
var
temp in test.AllInputs())
1723
out ImmutableDictionary<
BoundDagTemp
, IValueSet> whenTrueValues,
1725
out ImmutableDictionary<
BoundDagTemp
, IValueSet> whenFalseValues,
1760
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenTrueValues,
1761
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenFalseValues,
1765
ImmutableDictionary<
BoundDagTemp
, IValueSet> values,
1787
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenTrueValues,
1788
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenFalseValues,
1793
var
input = test.Input;
1806
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenTrueValues,
1807
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenFalseValues,
1810
splitValues<TValueSet>(ImmutableDictionary<
BoundDagTemp
, IValueSet> values,
BoundDagTemp
input, TValueSet fromTestPassing) where TValueSet : IValueSet
1824
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenTrueValues,
1825
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenFalseValues,
1850
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenTrueValues,
1851
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenFalseValues,
1871
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenTrueValues,
1872
ImmutableDictionary<
BoundDagTemp
, IValueSet> whenFalseValues,
1892
private static (
BoundDagTemp
? lengthTemp, int offset) TryGetTopLevelLengthTemp(BoundDagPropertyEvaluation e)
1896
BoundDagTemp
input = e.Input;
1897
BoundDagTemp
? lengthTemp = null;
1908
internal static (
BoundDagTemp
input,
BoundDagTemp
lengthTemp, int index) GetCanonicalInput(BoundDagIndexerEvaluation e)
1911
BoundDagTemp
input = e.Input;
1912
BoundDagTemp
lengthTemp = e.LengthTemp;
2202
BoundDagTemp
? testUnionInstance;
2214
BoundDagTemp
? otherUnionInstance;
2311
static UnionTestKind getUnionTestKind(BoundDagTest test, out TypeSymbol? targetType, out
BoundDagTemp
? testUnionInstance)
2349
static bool isAnyUnionValueNullTest(BoundDagTest test, [NotNullWhen(true)] out
BoundDagTemp
? testUnionInstance)
2355
static bool isAnyUnionValueNonNullTest(BoundDagTest test, [NotNullWhen(true)] out
BoundDagTemp
? testUnionInstance)
2361
static bool isAnyUnionValueTypeTest(BoundDagTest test, [NotNullWhen(true)] out TypeSymbol? targetType, [NotNullWhen(true)] out
BoundDagTemp
? testUnionInstance)
2374
static bool isUnionHasValueTest(BoundDagTest test, out bool sense, [NotNullWhen(true)] out
BoundDagTemp
? testUnionInstance)
2392
private static bool IsUnionTryGetValueTest(BoundDagTest test, [NotNullWhen(true)] out TypeSymbol? targetType, [NotNullWhen(true)] out
BoundDagTemp
? testUnionInstance, [NotNullWhen(true)] out BoundDagDeconstructEvaluation? tryGetValueEvaluation)
2432
private static bool IsSameEntity(
BoundDagTemp
input1,
BoundDagTemp
input2)
2434
BoundDagTemp
s1Input = OriginalInput(input1);
2435
BoundDagTemp
s2Input = OriginalInput(input2);
2453
if (IsAnyUnionValue(s1.Input, out
BoundDagTemp
? s1UnionInstance) &&
2454
IsAnyUnionValue(s2.Input, out
BoundDagTemp
? s2UnionInstance))
2514
(s1Input,
BoundDagTemp
s1LengthTemp, int s1Index) = GetCanonicalInput(s1);
2515
(s2Input,
BoundDagTemp
s2LengthTemp, int s2Index) = GetCanonicalInput(s2);
2572
(
BoundDagTemp
s1Input,
BoundDagTemp
s1LengthTemp, int s1Index) = GetCanonicalInput(s1);
2573
(
BoundDagTemp
s2Input,
BoundDagTemp
s2LengthTemp, int s2Index) = GetCanonicalInput(s2);
2593
BoundDagTemp
s1Input = NotTypeEvaluationInput(s1.Input.Source);
2594
BoundDagTemp
s2Input = NotTypeEvaluationInput(s2.Input.Source);
2606
BoundDagTemp
s1OriginalInput = NotTypeEvaluationInput(s1);
2607
BoundDagTemp
s2OriginalInput = NotTypeEvaluationInput(s2);
2615
if (IsAnyUnionValue(s1OriginalInput, out
BoundDagTemp
? s1UnionInstance) &&
2616
IsAnyUnionValue(s2OriginalInput, out
BoundDagTemp
? s2UnionInstance))
2663
private static bool IsAnyUnionValue(
BoundDagTemp
input, [NotNullWhen(true)] out
BoundDagTemp
? unionInstance)
2673
internal static
BoundDagTemp
NotTypeEvaluationInput(
BoundDagTemp
input)
2684
internal static
BoundDagTemp
NotTypeEvaluationInput(BoundDagTest test)
3031
/// A <see cref="
BoundDagTemp
"/> absent from this dictionary means that all values of the type are possible.
3033
public ImmutableDictionary<
BoundDagTemp
, IValueSet> RemainingValues { get; private set; } = null!;
3062
public static DagState GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<
BoundDagTemp
, IValueSet> remainingValues)
3106
internal void UpdateRemainingValues(ImmutableDictionary<
BoundDagTemp
, IValueSet> newRemainingValues)
3265
public readonly ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> FinalTempMap;
3275
ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> finalTempMap,
3288
protected abstract RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e);
3292
return RemoveEvaluationAndUpdateTempReferences(dagBuilder, state, bindings, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
>.Empty, e);
3295
protected Tests RemoveEvaluationAndUpdateTempReferences(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e)
3341
private static void AddBindingsPatchingAssignments(ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> oldTempMap, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> newTempMap, ArrayBuilder<Tests> assignments)
3350
if (TryGetTempReplacement(newTempMap, b.TempContainingValue, out
BoundDagTemp
? useValueFrom))
3352
if (!TryGetTempReplacement(oldTempMap, b.TempContainingValue, out
BoundDagTemp
? oldReplacement) ||
3362
private static bool TryGetTempReplacement(ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap,
BoundDagTemp
oldTemp, [NotNullWhen(true)] out
BoundDagTemp
? newTemp)
3367
while (tempMap.TryGetValue(newTemp, out
BoundDagTemp
? nextTemp))
3404
protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e)
3428
protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e)
3532
if (TryGetTopLevelLengthTemp(e) is (
BoundDagTemp
lengthTemp, int offset))
3575
protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e)
3659
static Tests removeEvaluation(One tests, DecisionDagBuilder builder, DagState state, ref ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e, out Tests? condition)
3699
ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap,
3733
private static Tests RemoveSimpleEvaluationWithResultTemp(One tests, ref ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e1)
3745
private static void AddResultTempReplacement(ref ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation oldEval, BoundDagEvaluation newEval)
3750
private static void AddTempReplacement(ref ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap,
BoundDagTemp
oldTemp,
BoundDagTemp
newTemp)
3752
var
current = newTemp;
3767
private static Tests RemoveDeconstructEvaluation(One tests, ref ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagDeconstructEvaluation e1)
3779
private static void AddOutParameterTempsReplacement(ref ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagDeconstructEvaluation oldDeconstruct, BoundDagDeconstructEvaluation newDeconstruct)
3781
ArrayBuilder<
BoundDagTemp
> newOutParamTemps = newDeconstruct.MakeOutParameterTemps();
3782
ArrayBuilder<
BoundDagTemp
> oldOutParamTemps = oldDeconstruct.MakeOutParameterTemps();
3791
private static Tests RemoveTypeEvaluation(One tests, DecisionDagBuilder dagBuilder, ref ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagTypeEvaluation e1)
3805
BoundDagTemp
e1Input = NotTypeEvaluationInput(e1);
3846
BoundDagTemp
oldTemp = typeEval.MakeResultTemp();
3847
BoundDagTemp
newTemp = newTypeEval.MakeResultTemp();
3868
private static Tests RemoveIndexerEvaluation(One tests, DecisionDagBuilder dagBuilder, DagState state, ref ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagIndexerEvaluation s1, out Tests? condition)
3878
(
BoundDagTemp
s1Input,
BoundDagTemp
s1LengthTemp, int s1Index) = GetCanonicalInput(s1);
3879
(
BoundDagTemp
s2Input,
BoundDagTemp
s2LengthTemp, int s2Index) = GetCanonicalInput(s2);
3926
private static BoundDagTest UpdateDagTempReferences(BoundDagTest test, ref ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap)
3944
if (!TryGetTempReplacement(tempMap, eval.Input, out
BoundDagTemp
? replacement))
3956
if (!TryGetTempReplacement(tempMap, indexer.Input, out
BoundDagTemp
? inputReplacement))
3961
if (!TryGetTempReplacement(tempMap, indexer.LengthTemp, out
BoundDagTemp
? lengthReplacement))
3972
if (!TryGetTempReplacement(tempMap, slice.Input, out
BoundDagTemp
? inputReplacement))
3977
if (!TryGetTempReplacement(tempMap, slice.LengthTemp, out
BoundDagTemp
? lengthReplacement))
3988
if (!TryGetTempReplacement(tempMap, assignment.Input, out
BoundDagTemp
? inputReplacement))
3998
if (!TryGetTempReplacement(tempMap, deconstruct.Input, out
BoundDagTemp
? replacement))
4020
if (!TryGetTempReplacement(tempMap, test.Input, out
BoundDagTemp
? replacement))
4041
public readonly
BoundDagTemp
Input;
4045
public ValueSet(
BoundDagTemp
input, IConstantValueSet values, SyntaxNode syntax)
4110
static bool isInputRelated(BoundDagTest test,
BoundDagTemp
valueSetInput)
4158
ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e)
4161
if (TryGetTempReplacement(tempMap, Input, out
BoundDagTemp
? replacement))
4210
protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e)
4331
protected sealed override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> tempMap, BoundDagEvaluation e)
4337
ImmutableDictionary<
BoundDagTemp
,
BoundDagTemp
> TempMapToRestore
4965
BoundDagTemp
input;
Binder\PatternExplainer.cs (23)
243
BoundDagTemp
rootIdentifier,
276
static string samplePatternFromOtherPaths(Binder binder,
BoundDagTemp
rootIdentifier, BoundDecisionDagNode rootNode,
311
out Dictionary<
BoundDagTemp
, ArrayBuilder<(BoundDagTest, bool)>> constraints,
312
out Dictionary<
BoundDagTemp
, ArrayBuilder<BoundDagEvaluation>> evaluations)
314
constraints = new Dictionary<
BoundDagTemp
, ArrayBuilder<(BoundDagTest, bool)>>();
315
evaluations = new Dictionary<
BoundDagTemp
, ArrayBuilder<BoundDagEvaluation>>();
326
BoundDagTemp
temp = test.Input;
344
BoundDagTemp
temp = e.Evaluation.Input;
359
BoundDagTemp
input,
360
Dictionary<
BoundDagTemp
, ArrayBuilder<(BoundDagTest test, bool sense)>> constraintMap,
361
Dictionary<
BoundDagTemp
, ArrayBuilder<BoundDagEvaluation>> evaluationMap,
379
static ImmutableArray<T> getArray<T>(Dictionary<
BoundDagTemp
, ArrayBuilder<T>> map,
BoundDagTemp
temp)
426
var
typedTemp = te.MakeResultTemp();
442
var
typedTemp = te.MakeResultTemp();
486
var
lengthTemp = lengthOrCount.MakeResultTemp();
514
var
indexerTemp = e.MakeResultTemp();
533
var
sliceTemp = slice.MakeResultTemp();
562
var
elementTemp = e.MakeResultTemp();
686
ArrayBuilder<
BoundDagTemp
> outParamTemps = e.MakeOutParameterTemps();
690
foreach (
var
elementTemp in outParamTemps)
722
var
subInput = e.MakeResultTemp();
729
var
subInput = e.MakeResultTemp();
Binder\SwitchExpressionBinder.cs (1)
106
this,
BoundDagTemp
.ForOriginalInput(boundInputExpression), nodes, n, nullPaths: false, reachabilityInfo: null, out bool requiresFalseWhenClause, out bool unnamedEnumValue);
BoundTree\BoundDagEvaluation.cs (48)
86
public sealed override BoundDagTest UpdateTestImpl(
BoundDagTemp
input) => Update(input);
88
public abstract
BoundDagTemp
MakeResultTemp();
89
public new BoundDagEvaluation Update(
BoundDagTemp
input) => UpdateEvaluationImpl(input);
90
public abstract BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input);
92
public virtual OneOrMany<
BoundDagTemp
> AllOutputs()
94
return new OneOrMany<
BoundDagTemp
>(MakeResultTemp());
133
public override
BoundDagTemp
MakeResultTemp()
138
public override BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input) => Update(input);
139
public new BoundDagTypeEvaluation Update(
BoundDagTemp
input)
148
if (DecisionDagBuilder.IsUnionTryGetValueEvaluation(nonTypeEvaluation, out _, out
BoundDagTemp
? unionInstance) ||
160
public override
BoundDagTemp
MakeResultTemp()
165
public override BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input) => Update(input);
166
public new BoundDagFieldEvaluation Update(
BoundDagTemp
input)
174
public override
BoundDagTemp
MakeResultTemp()
179
public override BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input) => Update(input);
180
public new BoundDagPropertyEvaluation Update(
BoundDagTemp
input)
196
public override
BoundDagTemp
MakeResultTemp()
202
public override BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input) => Update(input);
203
public new BoundDagIndexEvaluation Update(
BoundDagTemp
input)
228
public override
BoundDagTemp
MakeResultTemp()
233
public override BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input) => Update(input);
234
public new BoundDagIndexerEvaluation Update(
BoundDagTemp
input)
239
public BoundDagIndexerEvaluation Update(
BoundDagTemp
lengthTemp,
BoundDagTemp
input)
244
public override OneOrMany<
BoundDagTemp
> AllInputs()
246
return new OneOrMany<
BoundDagTemp
>([Input, LengthTemp]);
265
public override
BoundDagTemp
MakeResultTemp()
270
public override BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input) => Update(input);
271
public new BoundDagSliceEvaluation Update(
BoundDagTemp
input)
276
public BoundDagSliceEvaluation Update(
BoundDagTemp
lengthTemp,
BoundDagTemp
input)
281
public override OneOrMany<
BoundDagTemp
> AllInputs()
283
return new OneOrMany<
BoundDagTemp
>([Input, LengthTemp]);
304
public override
BoundDagTemp
MakeResultTemp()
309
public override BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input) => Update(input);
310
public new BoundDagAssignmentEvaluation Update(
BoundDagTemp
input)
318
public ArrayBuilder<
BoundDagTemp
> MakeOutParameterTemps()
323
var builder = ArrayBuilder<
BoundDagTemp
>.GetInstance(count);
334
public
BoundDagTemp
MakeFirstOutParameterTemp()
343
public
BoundDagTemp
MakeReturnValueTemp()
349
public override
BoundDagTemp
MakeResultTemp()
354
public override BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input) => Update(input);
355
public new BoundDagDeconstructEvaluation Update(
BoundDagTemp
input)
360
public override OneOrMany<
BoundDagTemp
> AllOutputs()
371
return new OneOrMany<
BoundDagTemp
>(one);
374
return new OneOrMany<
BoundDagTemp
>(builder.ToImmutableAndFree());
386
public override
BoundDagTemp
MakeResultTemp()
391
public override BoundDagEvaluation UpdateEvaluationImpl(
BoundDagTemp
input) => Update(input);
BoundTree\BoundDagRelationalTest.cs (2)
11
public override BoundDagTest UpdateTestImpl(
BoundDagTemp
input) => Update(input);
12
public new BoundDagRelationalTest Update(
BoundDagTemp
input)
BoundTree\BoundDagTemp.cs (4)
22
public static
BoundDagTemp
ForOriginalInput(SyntaxNode syntax, TypeSymbol type) => new BoundDagTemp(syntax, type, source: null, 0);
24
public override bool Equals(object? obj) => obj is
BoundDagTemp
other && this.Equals(other);
26
public bool Equals(
BoundDagTemp
other)
41
public bool IsEquivalentTo(
BoundDagTemp
other)
BoundTree\BoundDagTest.cs (11)
51
public BoundDagTest Update(
BoundDagTemp
input) => UpdateTestImpl(input);
52
public abstract BoundDagTest UpdateTestImpl(
BoundDagTemp
input);
54
public virtual OneOrMany<
BoundDagTemp
> AllInputs()
56
return new OneOrMany<
BoundDagTemp
>(Input);
140
public override BoundDagTest UpdateTestImpl(
BoundDagTemp
input) => Update(input);
141
public new BoundDagValueTest Update(
BoundDagTemp
input)
149
public override BoundDagTest UpdateTestImpl(
BoundDagTemp
input) => Update(input);
154
public override BoundDagTest UpdateTestImpl(
BoundDagTemp
input) => Update(input);
155
public new BoundDagNonNullTest Update(
BoundDagTemp
input)
163
public override BoundDagTest UpdateTestImpl(
BoundDagTemp
input) => Update(input);
164
public new BoundDagTypeTest Update(
BoundDagTemp
input)
BoundTree\BoundPatternBinding.cs (2)
15
public readonly
BoundDagTemp
TempContainingValue;
16
public BoundPatternBinding(BoundExpression variableAccess,
BoundDagTemp
tempContainingValue)
BoundTree\Constructors.cs (1)
649
public static
BoundDagTemp
ForOriginalInput(BoundExpression expr) => new BoundDagTemp(expr.Syntax, expr.Type!, source: null);
FlowAnalysis\NullableWalker_Patterns.cs (16)
389
var
rootTemp =
BoundDagTemp
.ForOriginalInput(expression);
413
var tempMap = PooledDictionary<
BoundDagTemp
, (int slot, TypeSymbol type)>.GetInstance();
452
ArrayBuilder<
BoundDagTemp
> outParamTemps = e.MakeOutParameterTemps();
453
foreach (
var
output in outParamTemps)
462
var
output = e.MakeResultTemp();
471
var
output = e.MakeResultTemp();
482
var
output = e.MakeResultTemp();
496
var
output = e.MakeResultTemp();
505
var
output = e.MakeResultTemp();
515
var
output = e.MakeResultTemp();
626
var
tempSource = binding.TempContainingValue;
681
int getOrMakeAndRegisterDagTempSlot(
BoundDagTemp
output)
853
void addToTempMap(
BoundDagTemp
output, int slot, TypeSymbol type)
954
int makeDagTempSlot(TypeWithAnnotations type,
BoundDagTemp
temp)
1095
_binder,
BoundDagTemp
.ForOriginalInput(node.Expression), nodes, leaf, nullPaths: true, reachabilityInfo, out bool requiresFalseWhenClause, out _);
Generated\BoundNodes.xml.Generated.cs (98)
5226
protected BoundDagTest(BoundKind kind, SyntaxNode syntax,
BoundDagTemp
input, bool hasErrors = false)
5235
public
BoundDagTemp
Input { get; }
5258
public
BoundDagTemp
Update(TypeSymbol type, BoundDagEvaluation? source, int index)
5262
var
result = new BoundDagTemp(this.Syntax, type, source, index, this.HasErrors);
5272
public BoundDagTypeTest(SyntaxNode syntax, TypeSymbol type,
BoundDagTemp
input, bool hasErrors = false)
5287
public BoundDagTypeTest Update(TypeSymbol type,
BoundDagTemp
input)
5301
public BoundDagNonNullTest(SyntaxNode syntax, bool isExplicitTest,
BoundDagTemp
input, bool hasErrors = false)
5315
public BoundDagNonNullTest Update(bool isExplicitTest,
BoundDagTemp
input)
5329
public BoundDagExplicitNullTest(SyntaxNode syntax,
BoundDagTemp
input, bool hasErrors = false)
5341
public new BoundDagExplicitNullTest Update(
BoundDagTemp
input)
5355
public BoundDagValueTest(SyntaxNode syntax, ConstantValue value,
BoundDagTemp
input, bool hasErrors = false)
5370
public BoundDagValueTest Update(ConstantValue value,
BoundDagTemp
input)
5384
public BoundDagRelationalTest(SyntaxNode syntax, BinaryOperatorKind operatorKind, ConstantValue value,
BoundDagTemp
input, bool hasErrors = false)
5401
public BoundDagRelationalTest Update(BinaryOperatorKind operatorKind, ConstantValue value,
BoundDagTemp
input)
5415
protected BoundDagEvaluation(BoundKind kind, SyntaxNode syntax,
BoundDagTemp
input, bool hasErrors = false)
5427
public BoundDagDeconstructEvaluation(SyntaxNode syntax, MethodSymbol deconstructMethod,
BoundDagTemp
input, bool hasErrors = false)
5442
public BoundDagDeconstructEvaluation Update(MethodSymbol deconstructMethod,
BoundDagTemp
input)
5456
public BoundDagTypeEvaluation(SyntaxNode syntax, TypeSymbol type,
BoundDagTemp
input, bool hasErrors = false)
5471
public BoundDagTypeEvaluation Update(TypeSymbol type,
BoundDagTemp
input)
5485
public BoundDagFieldEvaluation(SyntaxNode syntax, FieldSymbol field,
BoundDagTemp
input, bool hasErrors = false)
5500
public BoundDagFieldEvaluation Update(FieldSymbol field,
BoundDagTemp
input)
5514
public BoundDagPropertyEvaluation(SyntaxNode syntax, PropertySymbol property, bool isLengthOrCount,
BoundDagTemp
input, bool hasErrors = false)
5531
public BoundDagPropertyEvaluation Update(PropertySymbol property, bool isLengthOrCount,
BoundDagTemp
input)
5545
public BoundDagIndexEvaluation(SyntaxNode syntax, PropertySymbol property, int index,
BoundDagTemp
input, bool hasErrors = false)
5562
public BoundDagIndexEvaluation Update(PropertySymbol property, int index,
BoundDagTemp
input)
5576
public BoundDagIndexerEvaluation(SyntaxNode syntax, TypeSymbol indexerType,
BoundDagTemp
lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder,
BoundDagTemp
input, bool hasErrors = false)
5600
public
BoundDagTemp
LengthTemp { get; }
5609
public BoundDagIndexerEvaluation Update(TypeSymbol indexerType,
BoundDagTemp
lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder,
BoundDagTemp
input)
5623
public BoundDagSliceEvaluation(SyntaxNode syntax, TypeSymbol sliceType,
BoundDagTemp
lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder,
BoundDagTemp
input, bool hasErrors = false)
5648
public
BoundDagTemp
LengthTemp { get; }
5658
public BoundDagSliceEvaluation Update(TypeSymbol sliceType,
BoundDagTemp
lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder,
BoundDagTemp
input)
5672
public BoundDagAssignmentEvaluation(SyntaxNode syntax,
BoundDagTemp
target,
BoundDagTemp
input, bool hasErrors = false)
5682
public
BoundDagTemp
Target { get; }
5687
public BoundDagAssignmentEvaluation Update(
BoundDagTemp
target,
BoundDagTemp
input)
5701
public BoundDagPassThroughEvaluation(SyntaxNode syntax,
BoundDagTemp
input, bool hasErrors = false)
5713
public new BoundDagPassThroughEvaluation Update(
BoundDagTemp
input)
9349
return VisitDagTemp((
BoundDagTemp
)node, arg);
9694
public virtual R VisitDagTemp(
BoundDagTemp
node, A arg) => this.DefaultVisit(node, arg);
9935
public virtual BoundNode? VisitDagTemp(
BoundDagTemp
node) => this.DefaultVisit(node);
10587
public override BoundNode? VisitDagTemp(
BoundDagTemp
node)
11977
public override BoundNode? VisitDagTemp(
BoundDagTemp
node)
11985
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
11991
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
11996
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12001
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12006
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12012
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12017
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12024
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12030
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12036
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12041
BoundDagTemp
lengthTemp = (
BoundDagTemp
)this.Visit(node.LengthTemp);
12045
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12051
BoundDagTemp
lengthTemp = (
BoundDagTemp
)this.Visit(node.LengthTemp);
12055
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12061
BoundDagTemp
target = (
BoundDagTemp
)this.Visit(node.Target);
12062
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
12067
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
14170
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
14177
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
14184
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
14191
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
14198
BoundDagTemp
lengthTemp = (
BoundDagTemp
)this.Visit(node.LengthTemp);
14202
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
14209
BoundDagTemp
lengthTemp = (
BoundDagTemp
)this.Visit(node.LengthTemp);
14213
BoundDagTemp
input = (
BoundDagTemp
)this.Visit(node.Input);
16666
public override TreeDumperNode VisitDagTemp(
BoundDagTemp
node, object? arg) => new TreeDumperNode("dagTemp", null, new TreeDumperNode[]
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (4)
360
BoundExpression inputTemp = _tempAllocator.GetTemp(
BoundDagTemp
.ForOriginalInput(loweredSwitchGoverningExpression));
504
var
input = ((BoundTestDecisionDagNode)node).Test.Input;
552
BoundDagTemp
input)
561
BoundDagTemp
input,
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (18)
56
private readonly PooledDictionary<
BoundDagTemp
, BoundExpression> _map = PooledDictionary<
BoundDagTemp
, BoundExpression>.GetInstance();
94
public BoundExpression GetTemp(
BoundDagTemp
dagTemp)
115
public bool TrySetTemp(
BoundDagTemp
dagTemp, BoundExpression translation)
143
var
outputTemp = f.MakeResultTemp();
153
var
outputTemp = p.MakeResultTemp();
185
ArrayBuilder<
BoundDagTemp
> outParamTemps = d.MakeOutParameterTemps();
186
foreach (
var
outputTemp in outParamTemps)
225
var
outputTemp = t.MakeResultTemp();
264
var
outputTemp = e.MakeResultTemp();
289
var
outputTemp = e.MakeResultTemp();
315
var
outputTemp = e.MakeResultTemp();
553
var
inputDagTemp =
BoundDagTemp
.ForOriginalInput(loweredInput);
654
var
originalInput =
BoundDagTemp
.ForOriginalInput(loweredInput.Syntax, loweredInput.Type);
662
var
temp = fieldFetchEvaluation.MakeResultTemp();
675
void storeToTemp(
BoundDagTemp
temp, BoundExpression expr)
Utilities\ValueSetFactory.cs (3)
65
public static IConstantValueSetFactory? ForInput(
BoundDagTemp
input)
72
public static ITypeUnionValueSetFactory? TypeUnionValueSetFactoryForInput(CSharpCompilation compilation,
BoundDagTemp
input)
74
if (DecisionDagBuilder.IsUnionValue(input, out
BoundDagTemp
? unionInstance))