1 instantiation of BoundLambda
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
7623var result = new BoundLambda(this.Syntax, unboundLambda, symbol, body, diagnostics, binder, type, this.HasErrors);
111 references to BoundLambda
Microsoft.CodeAnalysis.CSharp (111)
Binder\Binder_Expressions.cs (1)
5346BoundLambda boundLambda = unboundLambda.Bind(type, isExpressionTree: false);
Binder\Binder_Invocation.cs (2)
1150var boundWithErrors = unboundLambda.BindForErrorRecovery(); 2042var discarded = unboundArgument.Bind((NamedTypeSymbol)parameterType, isExpressionTree: false);
Binder\Binder_Operators.cs (1)
2520case BoundLambda _:
Binder\Binder_Query.cs (2)
681var l1 = c1 != null ? c1.Operand as BoundLambda : null;
Binder\Binder_Statements.cs (2)
2049var lambda = anonymousFunction.BindForErrorRecovery(); 2215var bindingResult = anonymousFunction.Bind(delegateType, isExpressionTree: false);
Binder\RefSafetyAnalysis.cs (1)
318public override BoundNode? VisitLambda(BoundLambda node)
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1579var bound = anonymousFunction.Bind(delegateType, isTargetExpressionTree);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3257BoundLambda lambda = ((UnboundLambda)node).BindForReturnTypeInference(d);
BoundTree\BoundTreeVisitors.cs (1)
126return VisitLambda(node as BoundLambda, arg);
BoundTree\NullabilityRewriter.cs (2)
139return (T)remapLambda((BoundLambda)expr, lambda); 154Symbol remapLambda(BoundLambda boundLambda, LambdaSymbol lambda)
BoundTree\UnboundLambda.cs (40)
94internal BoundLambda WithInAnonymousFunctionConversion() 101var result = (BoundLambda)MemberwiseClone(); 186BoundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 449public BoundLambda Bind(NamedTypeSymbol delegateType, bool isExpressionTree) 452public BoundLambda BindForErrorRecovery() 455public BoundLambda BindForReturnTypeInference(NamedTypeSymbol delegateType) 458private BoundLambda SuppressIfNeeded(BoundLambda lambda) 459=> this.IsSuppressed ? (BoundLambda)lambda.WithSuppression() : lambda; 504Constraint = "Avoid " + nameof(ConcurrentDictionary<(NamedTypeSymbol, bool), BoundLambda>) + " which has a large default size, but this cache is normally small.")] 505private ImmutableDictionary<(NamedTypeSymbol Type, bool IsExpressionLambda), BoundLambda>? _bindingCache; 509Constraint = "Avoid " + nameof(ConcurrentDictionary<ReturnInferenceCacheKey, BoundLambda>) + " which has a large default size, but this cache is normally small.")] 510private ImmutableDictionary<ReturnInferenceCacheKey, BoundLambda>? _returnInferenceCache; 512private BoundLambda? _errorBinding; 521_bindingCache = ImmutableDictionary<(NamedTypeSymbol Type, bool IsExpressionLambda), BoundLambda>.Empty.WithComparers(BindingCacheComparer.Instance); 522_returnInferenceCache = ImmutableDictionary<ReturnInferenceCacheKey, BoundLambda>.Empty; 597public BoundLambda Bind(NamedTypeSymbol delegateType, bool isTargetExpressionTree) 601if (!_bindingCache!.TryGetValue((delegateType, inExpressionTree), out BoundLambda? result)) 613foreach (var lambda in _returnInferenceCache!.Values) 720BoundLambda.BlockReturns.GetReturnTypes(returnTypes, block); 721var inferredReturnType = BoundLambda.InferReturnType( 774private BoundLambda ReallyBind(NamedTypeSymbol delegateType, bool inExpressionTree) 799_returnInferenceCache!.TryGetValue(cacheKey, out BoundLambda? returnInferenceLambda) && 875var result = new BoundLambda(_unboundLambda.Syntax, _unboundLambda, block, diagnostics.ToReadOnlyAndFree(), lambdaBodyBinder, delegateType, inferredReturnType: default) 930private BoundLambda ReallyInferReturnType( 955BoundLambda.BlockReturns.GetReturnTypes(returnTypes, block); 956inferredReturnType = BoundLambda.InferReturnType(returnTypes, _unboundLambda, lambdaBodyBinder, delegateType, lambdaSymbol.IsAsync, lambdaBodyBinder.Conversions); 970var result = new BoundLambda( 1006public BoundLambda BindForReturnTypeInference(NamedTypeSymbol delegateType) 1010BoundLambda? result; 1021/// Behavior of this key should be kept aligned with <see cref="BoundLambda.InferReturnTypeImpl"/>. 1156public BoundLambda BindForErrorRecovery() 1174private BoundLambda ReallyBindForErrorRecovery() 1186[return: NotNullIfNotNull(nameof(lambda))] BoundLambda? rebind(BoundLambda? lambda) 1196private BoundLambda ReallyBindForErrorRecovery( 1239private static BoundLambda? GuessBestBoundLambda<T>(ImmutableDictionary<T, BoundLambda> candidates) 1250IEnumerable<KeyValuePair<T, BoundLambda>> minDiagnosticsGroup = candidates.GroupBy(lambda => lambda.Value.Diagnostics.Diagnostics.Length).OrderBy(group => group.Key).First();
Compilation\CSharpSemanticModel.cs (5)
2092var lambda = (BoundLambda)highestBoundExpr; 2227var lambda = (BoundLambda)boundExpr; 2233var lambda = ((UnboundLambda)boundExpr).BindForErrorRecovery();
Compilation\MemberSemanticModel.cs (3)
1749result = GetLambdaEnclosingBinder(position, node, innerLambdaOrQuery, ((BoundLambda)boundInnerLambdaOrQuery).Binder); 1814var lambda = (BoundLambda)node;
FlowAnalysis\AbstractFlowPass.cs (1)
1280public override BoundNode VisitLambda(BoundLambda node) => null;
FlowAnalysis\AbstractRegionControlFlowPass.cs (1)
31public override BoundNode VisitLambda(BoundLambda node)
FlowAnalysis\AbstractRegionDataFlowPass.cs (1)
40public override BoundNode VisitLambda(BoundLambda node)
FlowAnalysis\DefiniteAssignment.cs (1)
2422public override BoundNode VisitLambda(BoundLambda node)
FlowAnalysis\NullableWalker.cs (15)
1681BoundLambda lambda, 1839if (node is BoundLambda boundLambda && originalSymbol is LambdaSymbol l && updatedSymbol is NamedTypeSymbol n) 7951return getUnboundLambda((BoundLambda)argument, GetVariableState(_variables, lambdaState.Value)); 7997static UnboundLambda getUnboundLambda(BoundLambda expr, VariableState variableState) 8667private void ReportNullabilityMismatchWithTargetDelegate(Location location, NamedTypeSymbol delegateType, BoundLambda lambda) 8870if (conversionOperand is BoundLambda lambda) 9609case BoundLambda lambda: 9697Action<NamedTypeSymbol>? visitLambdaArgument(NamedTypeSymbol delegateType, BoundLambda lambda, bool isTargetTyped) 9704Action<NamedTypeSymbol>? analyzeLambdaConversion(NamedTypeSymbol delegateType, BoundLambda lambda, bool isTargetTyped) 9721Action<NamedTypeSymbol> analyzeLambdaConversionAsContinuation(BoundLambda lambda) 9849public override BoundNode? VisitLambda(BoundLambda node) 9863private void VisitLambda(BoundLambda node, NamedTypeSymbol? delegateTypeOpt, Optional<LocalState> initialState = default) 9883private static void UseDelegateInvokeParameterAndReturnTypes(BoundLambda lambda, MethodSymbol? delegateInvokeMethod, out bool useDelegateInvokeParameterTypes, out bool useDelegateInvokeReturnType) 9902var lambda = node.BindForErrorRecovery(); 11183if (child is BoundLambda lambda)
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
235if (node is BoundLambda && symbol is LambdaSymbol)
FlowAnalysis\VariablesDeclaredWalker.cs (1)
100public override BoundNode VisitLambda(BoundLambda node)
Generated\BoundNodes.xml.Generated.cs (10)
7619public BoundLambda Update(UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7623var result = new BoundLambda(this.Syntax, unboundLambda, symbol, body, diagnostics, binder, type, this.HasErrors); 9230return VisitLambda((BoundLambda)node, arg); 9503public virtual R VisitLambda(BoundLambda node, A arg) => this.DefaultVisit(node, arg); 9739public virtual BoundNode? VisitLambda(BoundLambda node) => this.DefaultVisit(node); 10636public override BoundNode? VisitLambda(BoundLambda node) 11984public override BoundNode? VisitLambda(BoundLambda node) 14541public override BoundNode? VisitLambda(BoundLambda node) 14546BoundLambda updatedNode; 16800public override TreeDumperNode VisitLambda(BoundLambda node, object? arg) => new TreeDumperNode("lambda", null, new TreeDumperNode[]
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (2)
705public override BoundNode VisitLambda(BoundLambda node) 875public override BoundNode VisitLambda(BoundLambda node)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
443public override BoundNode VisitLambda(BoundLambda node)
Lowering\ClosureConversion\ClosureConversion.cs (4)
1335return RewriteLambdaConversion((BoundLambda)node.Argument); 1397var result = (BoundExpression)RewriteLambdaConversion((BoundLambda)conversion.Operand); 1618private BoundNode RewriteLambdaConversion(BoundLambda node) 1788public override BoundNode VisitLambda(BoundLambda node)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (4)
112internal static BoundNode RewriteLambda(BoundLambda node, TypeCompilationState compilationState, TypeMap typeMap, int recursionDepth, BindingDiagnosticBag diagnostics) 219return VisitLambda((BoundLambda)node); 827private BoundExpression VisitLambda(BoundLambda node) 833private BoundExpression VisitLambdaInternal(BoundLambda node)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
560public override BoundNode VisitLambda(BoundLambda node)
Lowering\LocalRewriter\LocalRewriter.cs (1)
326public override BoundNode VisitLambda(BoundLambda node)
Lowering\SpillSequenceSpiller.cs (1)
1394public override BoundNode VisitLambda(BoundLambda node)
Operations\CSharpOperationFactory.cs (4)
88return CreateBoundLambdaOperation((BoundLambda)boundNode); 990BoundLambda boundLambda = unboundLambda.BindForErrorRecovery(); 994private IAnonymousFunctionOperation CreateBoundLambdaOperation(BoundLambda boundLambda) 1071((boundOperand as BoundLambda)?.Body.Statements.SingleOrDefault() as BoundReturnStatement)?.