16 instantiations of VisitResult
Microsoft.CodeAnalysis.CSharp (16)
FlowAnalysis\NullableWalker.cs (16)
148return new VisitResult(RValueType, lvalueType, NestedVisitResults);
151return new VisitResult(RValueType, lvalueType, StateForLambda);
337SetResult(expression, new VisitResult(resultType, lvalueType), updateAnalyzedNullability, isLvalue);
357SetAnalyzedNullability(expression, new VisitResult(resultType, lvalueType), isLvalue);
3518SetAnalyzedNullability(node.DeclaredTypeOpt, new VisitResult(type.ToTypeWithState(), type), true);
4164var result = new VisitResult(objectInitializer.Type, NullableAnnotation.NotAnnotated, NullableFlowState.NotNull);
4353SetAnalyzedNullability(node.ImplicitReceiverOpt, new VisitResult(node.ImplicitReceiverOpt.Type, NullableAnnotation.NotAnnotated, NullableFlowState.NotNull));
4390new VisitResult(
4417SetResult(node, new VisitResult(resultType, lvalueType, stateForLambda), updateAnalyzedNullability: true, isLvalue: null);
7550SetAnalyzedNullability(discard, new VisitResult(parameterWithState, parameterWithState.ToTypeWithAnnotations(compilation)), isLvalue: true);
9493var visitResult = new VisitResult(resultType, resultType.ToTypeWithAnnotations(compilation));
10968SetAnalyzedNullability(collectionExpression, new VisitResult(convertedResult, convertedResult.ToTypeWithAnnotations(compilation)));
11032var result = new VisitResult(GetReturnTypeWithState(moveNextAsyncMethod), moveNextAsyncMethod.ReturnTypeWithAnnotations);
11047var result = new VisitResult(GetReturnTypeWithState(disposeAsyncMethod), disposeAsyncMethod.ReturnTypeWithAnnotations);
11145SetAnalyzedNullability(node.IterationVariableType, new VisitResult(resultForType, destinationType), isLvalue: true);
11844new VisitResult(result, result.ToTypeWithAnnotations(compilation)),
67 references to VisitResult
Microsoft.CodeAnalysis.CSharp (67)
FlowAnalysis\NullableWalker.cs (67)
109public readonly VisitResult[]? NestedVisitResults;
137public VisitResult(TypeWithState rValueType, TypeWithAnnotations lValueType, VisitResult[] nestedVisitResults)
143internal VisitResult WithLValueType(TypeWithAnnotations lvalueType)
233private PooledDictionary<BoundValuePlaceholderBase, (BoundExpression? Replacement, VisitResult Result)>? _resultForPlaceholdersOpt;
247/// The delegate is invoked by <see cref="VisitConversion(BoundConversion, BoundExpression, Conversion, TypeWithAnnotations, TypeWithState, bool, bool, bool, AssignmentKind, ParameterSymbol, bool, bool, bool, bool, Optional<LocalState>,bool, Location, ArrayBuilder<VisitResult>)"/>.
278private VisitResult _visitResult;
286private VisitResult _currentConditionalReceiverVisitResult;
311VisitResult visitResult = _visitResult.WithLValueType(ResultType.ToTypeWithAnnotations(compilation));
340private void SetResult(BoundExpression? expression, VisitResult visitResult, bool updateAnalyzedNullability, bool? isLvalue)
363private void SetAnalyzedNullability(BoundExpression? expr, VisitResult result, bool? isLvalue = null)
535private void AddPlaceholderReplacement(BoundValuePlaceholderBase placeholder, BoundExpression? expression, VisitResult result)
542_resultForPlaceholdersOpt ??= PooledDictionary<BoundValuePlaceholderBase, (BoundExpression? Replacement, VisitResult Result)>.GetInstance();
3694var resultBuilder = ArrayBuilder<VisitResult>.GetInstance(node.Elements.Length);
3715var itemResult = spread.EnumeratorInfoOpt == null ? default : _visitResult;
3760var visitResult = new VisitResult(TypeWithState.Create(resultType), resultType,
3860(_, ImmutableArray<VisitResult> argumentResults, _, ArgumentsCompletionDelegate? argumentsCompletion) =
3884ImmutableArray<VisitResult> argumentResults,
3913ImmutableArray<VisitResult> argumentResults,
3953ImmutableArray<BoundExpression> arguments, ImmutableArray<VisitResult> argumentResults,
4024ImmutableArray<VisitResult> argumentResults)
4114ImmutableArray<VisitResult> argumentResults = default;
4150ImmutableArray<VisitResult> argumentResults,
4164var result = new VisitResult(objectInitializer.Type, NullableAnnotation.NotAnnotated, NullableFlowState.NotNull);
4172ImmutableArray<VisitResult> argumentResults,
4303ImmutableArray<VisitResult> argumentResults = default;
4326VisitResult receiverResult = argumentResults[0];
4338ImmutableArray<VisitResult> argumentResults,
4363ImmutableArray<VisitResult> argumentResults,
4376static MethodSymbol addMethodAsMemberOfContainingType(BoundCollectionElementInitializer node, TypeSymbol containingType, ref ImmutableArray<VisitResult> argumentResults)
4384VisitResult receiverResult = argumentResults[0];
4388var builder = ArrayBuilder<VisitResult>.GetInstance(argumentResults.Length);
6196VisitResult? extensionReceiverResult = null;
6275void reinferMethodAndVisitArguments(BoundCall node, TypeWithState receiverType, VisitResult? firstArgumentResult = null)
6285ImmutableArray<VisitResult> results;
6305private void LearnFromEqualsMethod(MethodSymbol method, BoundCall node, TypeWithState receiverType, ImmutableArray<VisitResult> results)
6484public readonly ImmutableArray<VisitResult> Results;
6487public CompareExchangeInfo(ImmutableArray<BoundExpression> arguments, ImmutableArray<VisitResult> results, ImmutableArray<int> argsToParamsOpt)
6714private (MethodSymbol? method, ImmutableArray<VisitResult> results, bool returnNotNull) VisitArguments(
6727private ImmutableArray<VisitResult> VisitArguments(
6742private (MethodSymbol? method, ImmutableArray<VisitResult> results, bool returnNotNull) VisitArguments(
6752VisitResult? firstArgumentResult = null)
6760private delegate (MethodSymbol? method, bool returnNotNull) ArgumentsCompletionDelegate(ImmutableArray<VisitResult> argumentResults, ImmutableArray<ParameterSymbol> parametersOpt, MethodSymbol? method);
6762private (MethodSymbol? method, ImmutableArray<VisitResult> results, bool returnNotNull, ArgumentsCompletionDelegate? completion)
6774VisitResult? firstArgumentResult = null)
6793ImmutableArray<VisitResult> results = VisitArgumentsEvaluate(argumentsNoConversions, refKindsOpt, GetParametersAnnotations(arguments, parametersOpt, argsToParamsOpt, expanded), defaultArguments, firstArgumentResult: firstArgumentResult);
6800(MethodSymbol? method, ImmutableArray<VisitResult> results, bool returnNotNull, ArgumentsCompletionDelegate? completion)
6806ImmutableArray<VisitResult> results,
6849var conversionResultsBuilder = ArrayBuilder<VisitResult>.GetInstance(results.Length);
6957var result = results[i];
6983return (ImmutableArray<VisitResult> results, ImmutableArray<ParameterSymbol> parametersOpt, MethodSymbol? method) =>
7216private ImmutableArray<VisitResult> VisitArgumentsEvaluate(
7221VisitResult? firstArgumentResult = null)
7227return ImmutableArray<VisitResult>.Empty;
7230var resultsBuilder = ArrayBuilder<VisitResult>.GetInstance(n);
7279private VisitResult VisitArgumentEvaluate(BoundExpression argument, RefKind refKind, FlowAnalysisAnnotations annotations)
7291private VisitResult VisitArgumentEvaluateEpilogue(BoundExpression argument, RefKind refKind, FlowAnalysisAnnotations annotations)
7350VisitResult result,
7351ArrayBuilder<VisitResult>? conversionResultsBuilder,
7487VisitResult result,
7926private ImmutableArray<BoundExpression> GetArgumentsForMethodTypeInference(ImmutableArray<VisitResult> argumentResults, ImmutableArray<BoundExpression> arguments)
7937var visitArgumentResult = argumentResults[i];
7942BoundExpression getArgumentForMethodTypeInference(BoundExpression argument, VisitResult visitResult)
8792ArrayBuilder<VisitResult>? previousArgumentConversionResults = null)
9493var visitResult = new VisitResult(resultType, resultType.ToTypeWithAnnotations(compilation));
10711var receiverResult = _visitResult;
11032var result = new VisitResult(GetReturnTypeWithState(moveNextAsyncMethod), moveNextAsyncMethod.ReturnTypeWithAnnotations);
11047var result = new VisitResult(GetReturnTypeWithState(disposeAsyncMethod), disposeAsyncMethod.ReturnTypeWithAnnotations);