4 instantiations of BoundLambda
Microsoft.CodeAnalysis.CSharp (4)
BoundTree\UnboundLambda.cs (3)
835var result = new BoundLambda(_unboundLambda.Syntax, _unboundLambda, block, diagnostics.ToReadOnlyAndFree(), lambdaBodyBinder, delegateType, inferredReturnType: default) 930var result = new BoundLambda( 1180return new BoundLambda(
Generated\BoundNodes.xml.Generated.cs (1)
7304var result = new BoundLambda(this.Syntax, unboundLambda, symbol, body, diagnostics, binder, type, this.HasErrors);
112 references to BoundLambda
Microsoft.CodeAnalysis.CSharp (112)
Binder\Binder_Conversions.cs (1)
703var boundLambda = unboundLambda.Bind((NamedTypeSymbol)destination, isExpressionTree: destination.IsGenericOrNonGenericExpressionType(out _)).WithInAnonymousFunctionConversion();
Binder\Binder_Expressions.cs (1)
4546BoundLambda boundLambda = unboundLambda.Bind(type, isExpressionTree: false);
Binder\Binder_Invocation.cs (2)
978var boundWithErrors = unboundLambda.BindForErrorRecovery(); 1706var discarded = unboundArgument.Bind((NamedTypeSymbol)parameterType, isExpressionTree: false);
Binder\Binder_Operators.cs (1)
2489case BoundLambda _:
Binder\Binder_Query.cs (2)
680var l1 = c1 != null ? c1.Operand as BoundLambda : null;
Binder\Binder_Statements.cs (2)
2016var lambda = anonymousFunction.BindForErrorRecovery(); 2182var bindingResult = anonymousFunction.Bind(delegateType, isExpressionTree: false);
Binder\RefSafetyAnalysis.cs (1)
273public override BoundNode? VisitLambda(BoundLambda node)
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1501var bound = anonymousFunction.Bind(delegateType, isTargetExpressionTree);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
2545BoundLambda lambda = ((UnboundLambda)node).BindForReturnTypeInference(d);
BoundTree\BoundTreeVisitors.cs (1)
126return VisitLambda(node as BoundLambda, arg);
BoundTree\NullabilityRewriter.cs (2)
96return (T)remapLambda((BoundLambda)expr, lambda); 111Symbol 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) 450public BoundLambda Bind(NamedTypeSymbol delegateType, bool isExpressionTree) 453public BoundLambda BindForErrorRecovery() 456public BoundLambda BindForReturnTypeInference(NamedTypeSymbol delegateType) 459private BoundLambda SuppressIfNeeded(BoundLambda lambda) 460=> this.IsSuppressed ? (BoundLambda)lambda.WithSuppression() : lambda; 495Constraint = "Avoid " + nameof(ConcurrentDictionary<(NamedTypeSymbol, bool), BoundLambda>) + " which has a large default size, but this cache is normally small.")] 496private ImmutableDictionary<(NamedTypeSymbol Type, bool IsExpressionLambda), BoundLambda>? _bindingCache; 500Constraint = "Avoid " + nameof(ConcurrentDictionary<ReturnInferenceCacheKey, BoundLambda>) + " which has a large default size, but this cache is normally small.")] 501private ImmutableDictionary<ReturnInferenceCacheKey, BoundLambda>? _returnInferenceCache; 503private BoundLambda? _errorBinding; 512_bindingCache = ImmutableDictionary<(NamedTypeSymbol Type, bool IsExpressionLambda), BoundLambda>.Empty.WithComparers(BindingCacheComparer.Instance); 513_returnInferenceCache = ImmutableDictionary<ReturnInferenceCacheKey, BoundLambda>.Empty; 577public BoundLambda Bind(NamedTypeSymbol delegateType, bool isTargetExpressionTree) 581if (!_bindingCache!.TryGetValue((delegateType, inExpressionTree), out BoundLambda? result)) 593foreach (var lambda in _returnInferenceCache!.Values) 684BoundLambda.BlockReturns.GetReturnTypes(returnTypes, block); 685var inferredReturnType = BoundLambda.InferReturnType( 735private BoundLambda ReallyBind(NamedTypeSymbol delegateType, bool inExpressionTree) 760_returnInferenceCache!.TryGetValue(cacheKey, out BoundLambda? returnInferenceLambda) && 835var result = new BoundLambda(_unboundLambda.Syntax, _unboundLambda, block, diagnostics.ToReadOnlyAndFree(), lambdaBodyBinder, delegateType, inferredReturnType: default) 890private BoundLambda ReallyInferReturnType( 915BoundLambda.BlockReturns.GetReturnTypes(returnTypes, block); 916inferredReturnType = BoundLambda.InferReturnType(returnTypes, _unboundLambda, lambdaBodyBinder, delegateType, lambdaSymbol.IsAsync, lambdaBodyBinder.Conversions); 930var result = new BoundLambda( 966public BoundLambda BindForReturnTypeInference(NamedTypeSymbol delegateType) 970BoundLambda? result; 981/// Behavior of this key should be kept aligned with <see cref="BoundLambda.InferReturnTypeImpl"/>. 1116public BoundLambda BindForErrorRecovery() 1134private BoundLambda ReallyBindForErrorRecovery() 1146[return: NotNullIfNotNull(nameof(lambda))] BoundLambda? rebind(BoundLambda? lambda) 1156private BoundLambda ReallyBindForErrorRecovery( 1199private static BoundLambda? GuessBestBoundLambda<T>(ImmutableDictionary<T, BoundLambda> candidates) 1210IEnumerable<KeyValuePair<T, BoundLambda>> minDiagnosticsGroup = candidates.GroupBy(lambda => lambda.Value.Diagnostics.Diagnostics.Length).OrderBy(group => group.Key).First();
Compilation\CSharpSemanticModel.cs (5)
2113var lambda = (BoundLambda)highestBoundExpr; 2225var lambda = (BoundLambda)boundExpr; 2231var lambda = ((UnboundLambda)boundExpr).BindForErrorRecovery();
Compilation\MemberSemanticModel.cs (3)
1740result = GetLambdaEnclosingBinder(position, node, innerLambdaOrQuery, ((BoundLambda)boundInnerLambdaOrQuery).Binder); 1805var lambda = (BoundLambda)node;
FlowAnalysis\AbstractFlowPass.cs (1)
1224public 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)
2258public override BoundNode VisitLambda(BoundLambda node)
FlowAnalysis\NullableWalker.cs (15)
1633BoundLambda lambda, 1791if (node is BoundLambda boundLambda && originalSymbol is LambdaSymbol l && updatedSymbol is NamedTypeSymbol n) 7151return getUnboundLambda((BoundLambda)argument, GetVariableState(_variables, lambdaState.Value)); 7165static UnboundLambda getUnboundLambda(BoundLambda expr, VariableState variableState) 7807private void ReportNullabilityMismatchWithTargetDelegate(Location location, NamedTypeSymbol delegateType, BoundLambda lambda) 8004if (conversionOperand is BoundLambda lambda) 8712case BoundLambda lambda: 8800Action<NamedTypeSymbol>? visitLambdaArgument(NamedTypeSymbol delegateType, BoundLambda lambda, bool isTargetTyped) 8807Action<NamedTypeSymbol>? analyzeLambdaConversion(NamedTypeSymbol delegateType, BoundLambda lambda, bool isTargetTyped) 8824Action<NamedTypeSymbol> analyzeLambdaConversionAsContinuation(BoundLambda lambda) 8952public override BoundNode? VisitLambda(BoundLambda node) 8966private void VisitLambda(BoundLambda node, NamedTypeSymbol? delegateTypeOpt, Optional<LocalState> initialState = default) 8986private static void UseDelegateInvokeParameterAndReturnTypes(BoundLambda lambda, MethodSymbol? delegateInvokeMethod, out bool useDelegateInvokeParameterTypes, out bool useDelegateInvokeReturnType) 9005var lambda = node.BindForErrorRecovery(); 10265if (child is BoundLambda lambda)
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
238if (node is BoundLambda && symbol is LambdaSymbol)
FlowAnalysis\VariablesDeclaredWalker.cs (1)
100public override BoundNode VisitLambda(BoundLambda node)
Generated\BoundNodes.xml.Generated.cs (10)
7300public BoundLambda Update(UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ImmutableBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7304var result = new BoundLambda(this.Syntax, unboundLambda, symbol, body, diagnostics, binder, type, this.HasErrors); 8895return VisitLambda((BoundLambda)node, arg); 9160public virtual R VisitLambda(BoundLambda node, A arg) => this.DefaultVisit(node, arg); 9388public virtual BoundNode? VisitLambda(BoundLambda node) => this.DefaultVisit(node); 10256public override BoundNode? VisitLambda(BoundLambda node) 11549public override BoundNode? VisitLambda(BoundLambda node) 14003public override BoundNode? VisitLambda(BoundLambda node) 14008BoundLambda updatedNode; 16179public override TreeDumperNode VisitLambda(BoundLambda node, object? arg) => new TreeDumperNode("lambda", null, new TreeDumperNode[]
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (2)
672public override BoundNode VisitLambda(BoundLambda node) 842public override BoundNode VisitLambda(BoundLambda node)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
425public override BoundNode VisitLambda(BoundLambda node)
Lowering\ClosureConversion\ClosureConversion.cs (4)
1319return RewriteLambdaConversion((BoundLambda)node.Argument); 1381var result = (BoundExpression)RewriteLambdaConversion((BoundLambda)conversion.Operand); 1590private BoundNode RewriteLambdaConversion(BoundLambda node) 1760public override BoundNode VisitLambda(BoundLambda node)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (4)
114internal static BoundNode RewriteLambda(BoundLambda node, TypeCompilationState compilationState, TypeMap typeMap, int recursionDepth, BindingDiagnosticBag diagnostics) 221return VisitLambda((BoundLambda)node); 748private BoundExpression VisitLambda(BoundLambda node) 754private BoundExpression VisitLambdaInternal(BoundLambda node)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
517public override BoundNode VisitLambda(BoundLambda node)
Lowering\LocalRewriter\LocalRewriter.cs (1)
288public override BoundNode VisitLambda(BoundLambda node)
Lowering\SpillSequenceSpiller.cs (1)
1302public override BoundNode VisitLambda(BoundLambda node)
Operations\CSharpOperationFactory.cs (4)
88return CreateBoundLambdaOperation((BoundLambda)boundNode); 984BoundLambda boundLambda = unboundLambda.BindForErrorRecovery(); 988private IAnonymousFunctionOperation CreateBoundLambdaOperation(BoundLambda boundLambda) 1065((boundOperand as BoundLambda)?.Body.Statements.SingleOrDefault() as BoundReturnStatement)?.