4 instantiations of NullableWalker
Microsoft.CodeAnalysis.CSharp (4)
FlowAnalysis\NullableWalker.cs (4)
1573
var walker = new
NullableWalker
(
1691
var walker = new
NullableWalker
(
1738
var walker = new
NullableWalker
(compilation,
4705
var walker = new
NullableWalker
(binder.Compilation,
76 references to NullableWalker
Microsoft.CodeAnalysis.CSharp (76)
Binder\Semantics\BestTypeInferrer.cs (3)
72
Debug.Assert(!
NullableWalker
.IsTargetTypedExpression(expr));
137
Debug.Assert(!
NullableWalker
.IsTargetTypedExpression(expr1));
152
Debug.Assert(!
NullableWalker
.IsTargetTypedExpression(expr2));
BoundTree\UnboundLambda.cs (6)
117
public TypeWithAnnotations GetInferredReturnType(ConversionsBase? conversions,
NullableWalker
.VariableState? nullableState, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool inferredFromFunctionType)
148
NullableWalker
.Analyze(compilation,
285
bestResultType =
NullableWalker
.BestTypeForLambdaReturns(returns, binder, node, (Conversions)conversions, out inferredFromFunctionType);
388
private readonly
NullableWalker
.VariableState? _nullableState;
420
private UnboundLambda(SyntaxNode syntax, UnboundLambdaState state, FunctionTypeSymbol? functionType, bool withDependencies,
NullableWalker
.VariableState? nullableState, bool hasErrors) :
426
internal UnboundLambda WithNullableState(
NullableWalker
.VariableState nullableState)
Compilation\AttributeSemanticModel.cs (3)
107
out
NullableWalker
.SnapshotManager? snapshotManager,
110
return
NullableWalker
.AnalyzeAndRewrite(Compilation, symbol: null, boundRoot, binder, initialState: null, diagnostics, createSnapshots, out snapshotManager, ref remappedSymbols);
115
NullableWalker
.AnalyzeWithoutRewrite(Compilation, symbol: null, boundRoot, binder, diagnostics, createSnapshots);
Compilation\InitializerSemanticModel.cs (3)
258
out
NullableWalker
.SnapshotManager snapshotManager,
263
return
NullableWalker
.AnalyzeAndRewrite(Compilation, MemberSymbol, boundRoot, binder, initialState: null, diagnostics, createSnapshots, out snapshotManager, ref remappedSymbols);
268
NullableWalker
.AnalyzeWithoutRewrite(Compilation, MemberSymbol, boundRoot, binder, diagnostics, createSnapshots);
Compilation\MemberSemanticModel.cs (8)
35
private
NullableWalker
.SnapshotManager _lazySnapshotManager;
155
protected virtual
NullableWalker
.SnapshotManager GetSnapshotManager()
206
return (BoundExpression)
NullableWalker
.AnalyzeAndRewriteSpeculation(position, boundRoot, binder, snapshotManager, newSnapshots: out _, remappedSymbols: ref ignored);
1473
protected void UnguardedAddBoundTreeForStandaloneSyntax(SyntaxNode syntax, BoundNode bound,
NullableWalker
.SnapshotManager manager = null, ImmutableDictionary<Symbol, Symbol> remappedSymbols = null)
1481
protected void GuardedAddBoundTreeForStandaloneSyntax(SyntaxNode syntax, BoundNode bound,
NullableWalker
.SnapshotManager manager = null, ImmutableDictionary<Symbol, Symbol> remappedSymbols = null)
1959
NullableWalker
.SnapshotManager snapshotManager;
1977
boundRoot =
NullableWalker
.AnalyzeAndRewriteSpeculation(_containingPublicSemanticModel.OriginalPositionForSpeculation, boundRoot, binder, parentSnapshotManagerOpt, out var newSnapshots, ref remappedSymbols);
2044
out
NullableWalker
.SnapshotManager? snapshotManager,
Compilation\MemberSemanticModel.SpeculativeMemberSemanticModel.cs (4)
37
protected override
NullableWalker
.SnapshotManager GetSnapshotManager()
48
out
NullableWalker
.SnapshotManager snapshotManager,
52
return
NullableWalker
.AnalyzeAndRewrite(Compilation, MemberSymbol as MethodSymbol, boundRoot, binder, initialState: null, diagnostics, createSnapshots: false, out snapshotManager, ref remappedSymbols);
57
NullableWalker
.AnalyzeWithoutRewrite(Compilation, MemberSymbol as MethodSymbol, boundRoot, binder, diagnostics, createSnapshots);
Compilation\MethodBodySemanticModel.cs (8)
24
internal readonly
NullableWalker
.SnapshotManager? SnapshotManager;
31
NullableWalker
.SnapshotManager? snapshotManager = null,
115
NullableWalker
.SnapshotManager snapshotManagerOpt,
127
NullableWalker
.SnapshotManager snapshotManagerOpt,
291
out
NullableWalker
.SnapshotManager snapshotManager,
294
var afterInitializersState =
NullableWalker
.GetAfterInitializersState(Compilation, MemberSymbol, boundRoot);
295
return
NullableWalker
.AnalyzeAndRewrite(Compilation, MemberSymbol, boundRoot, binder, afterInitializersState, diagnostics, createSnapshots, out snapshotManager, ref remappedSymbols);
300
NullableWalker
.AnalyzeWithoutRewrite(Compilation, MemberSymbol, boundRoot, binder, diagnostics, createSnapshots);
Compilation\SpeculativeSemanticModelWithMemberModel.cs (5)
24
private readonly
NullableWalker
.SnapshotManager? _parentSnapshotManagerOpt;
31
NullableWalker
.SnapshotManager? snapshotManagerOpt)
94
NullableWalker
.SnapshotManager? snapshotManagerOpt)
107
NullableWalker
.SnapshotManager? snapshotManagerOpt)
117
internal
NullableWalker
.SnapshotManager? ParentSnapshotManagerOpt => _parentSnapshotManagerOpt;
Compiler\MethodCompiler.cs (9)
621
NullableWalker
.AnalyzeIfNeeded(
975
NullableWalker
.AnalyzeIfNeeded(
1751
NullableWalker
.VariableState? nullableInitialState = null;
1798
NullableWalker
.SnapshotManager? snapshotManager = null;
1811
methodBodyForSemanticModel =
NullableWalker
.AnalyzeAndRewrite(
1826
NullableWalker
.AnalyzeIfNeeded(
1924
NullableWalker
.AnalyzeIfNeeded(
1965
NullableWalker
.VariableState? getInitializerState(BoundNode? body)
1969
return
NullableWalker
.GetAfterInitializersState(compilationState.Compilation, method, initializersBody, body, diagnostics);
FlowAnalysis\NullableWalker.cs (16)
27
: LocalDataFlowPass<
NullableWalker
.LocalState,
NullableWalker
.LocalFunctionState>
37
internal readonly ConcurrentDictionary<object,
NullableWalker
.Data> Data;
42
Data = new ConcurrentDictionary<object,
NullableWalker
.Data>();
1440
NullableWalker
.AnalyzeIfNeeded(
1573
var
walker = new NullableWalker(
1691
var
walker = new NullableWalker(
1738
var
walker = new NullableWalker(compilation,
1770
NullableWalker
walker,
4705
var
walker = new NullableWalker(binder.Compilation,
7876
private readonly
NullableWalker
_walker;
7878
internal MethodInferenceExtensions(
NullableWalker
walker)
12353
public void NormalizeIfNeeded(int slot,
NullableWalker
walker, Variables variables, bool useNotNullsAsDefault = false)
12382
public void Normalize(
NullableWalker
walker, Variables variables, bool useNotNullsAsDefault = false)
12398
public void PopulateAll(
NullableWalker
walker)
12404
private void Populate(
NullableWalker
walker, int start, bool useNotNullsAsDefault)
FlowAnalysis\NullableWalker_Patterns.cs (1)
359
public static PossiblyConditionalState Create(
NullableWalker
nullableWalker)
Generated\BoundNodes.xml.Generated.cs (2)
12218
private readonly
NullableWalker
.SnapshotManager? _snapshotManager;
12221
public NullabilityRewriter(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> updatedNullabilities,
NullableWalker
.SnapshotManager? snapshotManager, ImmutableDictionary<Symbol, Symbol>.Builder remappedSymbols)
Symbols\NullableFlowState.cs (1)
10
/// The nullable state of an rvalue computed in <see cref="
NullableWalker
"/>.
Symbols\Source\SourceComplexParameterSymbol.cs (3)
263
NullableWalker
.AnalyzeIfNeeded(binder, parameterEqualsValue, valueSyntax, diagnostics.DiagnosticBag);
325
if (attributes is null || !
NullableWalker
.NeedsAnalysis(DeclaringCompilation, attributes))
352
NullableWalker
.AnalyzeIfNeeded(binder, parameterEqualsValue, parameterSyntax, diagnostics.DiagnosticBag);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
1277
if (!
NullableWalker
.AreParameterAnnotationsCompatible(
1309
else if (!
NullableWalker
.AreParameterAnnotationsCompatible(
1332
if (notNullIfParameterNotNull.Contains(overrideParam.Name) &&
NullableWalker
.GetParameterState(baseParam.TypeWithAnnotations, baseParam.FlowAnalysisAnnotations).IsNotNull)
Symbols\Symbol_Attributes.cs (1)
428
NullableWalker
.AnalyzeIfNeeded(attributeBinder, boundAttribute, boundAttribute.Syntax, diagnostics.DiagnosticBag);