Binder\Binder_Await.cs (11)
62out BoundCall? runtimeAsyncAwaitCall,
95var call = (BoundCall)expression;
249out BoundCall? runtimeAsyncAwaitCall,
264out BoundCall? runtimeAsyncAwaitCall,
311bool tryGetRuntimeAwaitHelper(BoundExpression expression, out BoundAwaitableValuePlaceholder? placeholder, out BoundCall? runtimeAwaitCall, BindingDiagnosticBag diagnostics)
475bool getRuntimeAwaitAwaiter(TypeSymbol awaiterType, out BoundCall? runtimeAwaitAwaiterCall, out BoundAwaitableValuePlaceholder? placeholder, SyntaxNode syntax, BindingDiagnosticBag diagnostics)
594var call = (BoundCall)getAwaiterCall;
704var call = (BoundCall)getAwaiterGetResultCall;
Binder\Binder_Invocation.cs (7)
1082var call = (BoundCall)expression;
1136private BoundCall BindInvocationExpressionContinued(
1990private BoundCall CreateBadCall(
2045return BoundCall.ErrorCall(node, receiver, method, args, argNames, argRefKinds, isDelegate, invokedAsExtensionMethod: invokedAsExtensionMethod, originalMethods: methods, resultKind: resultKind, binder: this);
2269private BoundCall CreateBadCall(
2284return BoundCall.ErrorCall(node, expr, method, args, argNames, argRefKinds, isDelegateCall: false, invokedAsExtensionMethod: false, originalMethods: originalMethods, resultKind: resultKind, binder: this);
Binder\Binder_Query.cs (19)
233var result = MakeQueryInvocation(state.selectOrGroup, e, receiverIsCheckedForRValue: false, "Select", lambda, diagnostics
257BoundCall result;
308private static BoundCall ReverseLastTwoParameterOrder(BoundCall result)
367var invocation = MakeQueryInvocation(where, state.fromExpression, receiverIsCheckedForRValue: false, "Where", lambda, diagnostics
415BoundCall invocation;
483BoundCall invocation;
572var invocation = MakeQueryInvocation(ordering, state.fromExpression, receiverIsCheckedForRValue: false, methodName, lambda, diagnostics
615var invocation = MakeQueryInvocation(
663var invocation = MakeQueryInvocation(
683private static BoundExpression? ExtractCastInvocation(BoundCall invocation)
694var i1 = r1 != null ? r1.ExpressionOpt as BoundCall : null;
768var invocation = MakeQueryInvocation(let, state.fromExpression, receiverIsCheckedForRValue: false, "Select", lambda, diagnostics
885protected BoundCall MakeQueryInvocation(CSharpSyntaxNode node, BoundExpression receiver, bool receiverIsCheckedForRValue, string methodName, BoundExpression arg, BindingDiagnosticBag diagnostics
898protected BoundCall MakeQueryInvocation(CSharpSyntaxNode node, BoundExpression receiver, bool receiverIsCheckedForRValue, string methodName, ImmutableArray<BoundExpression> args, BindingDiagnosticBag diagnostics
911protected BoundCall MakeQueryInvocation(CSharpSyntaxNode node, BoundExpression receiver, bool receiverIsCheckedForRValue, string methodName, TypeSyntax typeArgSyntax, TypeWithAnnotations typeArg, BindingDiagnosticBag diagnostics
924protected BoundCall MakeQueryInvocation(CSharpSyntaxNode node, BoundExpression receiver, bool receiverIsCheckedForRValue, string methodName, SeparatedSyntaxList<TypeSyntax> typeArgsSyntax, ImmutableArray<TypeWithAnnotations> typeArgs, ImmutableArray<BoundExpression> args, BindingDiagnosticBag diagnostics
1010return (BoundCall)MakeInvocationExpression(
BoundTree\Constructors.cs (8)
106public BoundCall Update(BoundExpression? receiverOpt,
121public static BoundCall ErrorCall(
165public BoundCall Update(ImmutableArray<BoundExpression> arguments)
170public BoundCall Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments)
175public static BoundCall Synthesized(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method)
180public static BoundCall Synthesized(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, BoundExpression arg0)
185public static BoundCall Synthesized(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, BoundExpression arg0, BoundExpression arg1)
190public static BoundCall Synthesized(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt = default)
CodeGen\EmitExpression.cs (20)
103EmitCallExpression((BoundCall)expression, used ? UseKind.UsedAsValue : UseKind.Unused);
630protected override void VisitReceiver(BoundCall node)
1629private void EmitCallExpression(BoundCall call, UseKind useKind)
1646private void EmitDefaultValueTypeConstructorCallExpression(BoundCall call)
1666private void EmitStaticCallExpression(BoundCall call, UseKind useKind)
1703private void EmitInstanceCallExpression(BoundCall call, UseKind useKind)
1712if (receiverIsInstanceCall(call, out BoundCall nested))
1714var calls = ArrayBuilder<BoundCall>.GetInstance();
1730var parentCall = calls.Pop();
1850CallKind determineEmitReceiverStrategy(BoundCall call, out AddressKind? addressKind, out bool box)
1941void emitReceiver(BoundCall call, CallKind callKind, AddressKind? addressKind, bool box, out LocalDefinition tempOpt)
1967void emitArgumentsAndCallEpilogue(BoundCall call, CallKind callKind, UseKind useKind)
2047void emitGenericReceiverCloneIfNecessary(BoundCall call, CallKind callKind, ref LocalDefinition tempOpt)
2098static bool receiverIsInstanceCall(BoundCall call, out BoundCall nested)
2100if (call.ReceiverOpt is BoundCall { Method: { RequiresInstanceReceiver: true } method } receiver && !method.IsDefaultValueTypeConstructor())
2247return ((BoundCall)receiver).Method.RefKind != RefKind.None;
2968var left = (BoundCall)assignmentTarget;
3172Debug.Assert(((BoundCall)expression).Method.RefKind != RefKind.None);
FlowAnalysis\NullableWalker.cs (16)
1574return constructorBody is BoundConstructorMethodBody { Initializer: BoundExpressionStatement { Expression: BoundCall { Method: { MethodKind: MethodKind.Constructor } initializerMethod } } }
6509public override BoundNode? VisitCall(BoundCall node)
6512if (tryGetReceiver(node, out BoundCall? receiver))
6515var calls = ArrayBuilder<BoundCall>.GetInstance();
6523while (tryGetReceiver(node, out BoundCall? receiver2))
6612bool tryGetReceiver(BoundCall node, [MaybeNullWhen(returnValue: false)] out BoundCall receiver)
6614if (node.ReceiverOpt is BoundCall instanceReceiver)
6620if (node.InvokedAsExtensionMethod && node.Arguments is [BoundCall extensionReceiver, ..] &&
6633TypeWithState visitAndCheckReceiver(BoundCall node)
6643void reinferMethodAndVisitArguments(BoundCall node, TypeWithState receiverType, VisitResult? firstArgumentResult = null)
6824private void LearnFromEqualsMethod(MethodSymbol method, BoundCall node, TypeWithState receiverType, ImmutableArray<VisitResult> results)
7416if (node is BoundCall { HasErrors: true, ArgumentNamesOpt.IsDefaultOrEmpty: false, ArgsToParamsOpt.IsDefault: true } &&
7460if (node is BoundCall { Method: { OriginalDefinition: LocalFunctionSymbol localFunction } })
10830var invocation = conversion.DeconstructionInfo.Invocation as BoundCall;
Generated\BoundNodes.xml.Generated.cs (17)
2130public BoundAwaitableInfo(SyntaxNode syntax, BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, BoundCall? runtimeAsyncAwaitCall, BoundAwaitableValuePlaceholder? runtimeAsyncAwaitCallPlaceholder, bool hasErrors = false)
2151public BoundCall? RuntimeAsyncAwaitCall { get; }
2157public BoundAwaitableInfo Update(BoundAwaitableValuePlaceholder? awaitableInstancePlaceholder, bool isDynamic, BoundExpression? getAwaiter, PropertySymbol? isCompleted, MethodSymbol? getResult, BoundCall? runtimeAsyncAwaitCall, BoundAwaitableValuePlaceholder? runtimeAsyncAwaitCallPlaceholder)
6188public BoundCall Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool isDelegateCall, bool expanded, bool invokedAsExtensionMethod, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalMethodsOpt, TypeSymbol type)
6192var result = new BoundCall(this.Syntax, receiverOpt, initialBindingReceiverIsSubjectToCloning, method, arguments, argumentNamesOpt, argumentRefKindsOpt, isDelegateCall, expanded, invokedAsExtensionMethod, argsToParamsOpt, defaultArguments, resultKind, originalMethodsOpt, type, this.HasErrors);
9197return VisitCall((BoundCall)node, arg);
9506public virtual R VisitCall(BoundCall node, A arg) => this.DefaultVisit(node, arg);
9742public virtual BoundNode? VisitCall(BoundCall node) => this.DefaultVisit(node);
10500public override BoundNode? VisitCall(BoundCall node)
11189BoundCall? runtimeAsyncAwaitCall = (BoundCall?)this.Visit(node.RuntimeAsyncAwaitCall);
11891public override BoundNode? VisitCall(BoundCall node)
13127BoundCall? runtimeAsyncAwaitCall = (BoundCall?)this.Visit(node.RuntimeAsyncAwaitCall);
14107public override BoundNode? VisitCall(BoundCall node)
14113BoundCall updatedNode;
16565public override TreeDumperNode VisitCall(BoundCall node, object? arg) => new TreeDumperNode("call", null, new TreeDumperNode[]
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (11)
87var falseOperatorCall = BoundCall.Synthesized(syntax, receiverOpt: node.ConstrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, node.ConstrainedToTypeOpt),
777return BoundCall.Synthesized(
804return BoundCall.Synthesized(
914return BoundCall.Synthesized(
946return BoundCall.Synthesized(
1858BoundExpression callX_GetValueOrDefault = BoundCall.Synthesized(syntax, boundTempX, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefaultX);
1860BoundExpression callY_GetValueOrDefault = BoundCall.Synthesized(syntax, boundTempY, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefaultY);
2023return BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, loweredLeft, loweredRight);
2049: (BoundExpression)BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, loweredLeft, loweredRight);
2084return BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, loweredLeft, loweredRight);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (10)
1083value = BoundCall.Synthesized(syntax, rewrittenOperand, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, get_Value);
1183BoundCall.Synthesized(syntax, boundTemp, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefault),
1226return MakeLiftedUserDefinedConversionConsequence(BoundCall.Synthesized(
1371BoundExpression result = BoundCall.Synthesized(
1381private BoundExpression MakeLiftedUserDefinedConversionConsequence(BoundCall call, TypeSymbol resultType)
1443BoundCall callGetValueOrDefault = BoundCall.Synthesized(syntax, boundTemp, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefault);
1448BoundCall userDefinedCall = BoundCall.Synthesized(
1747return BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, operand);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (6)
204BoundCall.Synthesized(
450BoundExpression disposeCall = BoundCall.Synthesized(syntax: forEachSyntax, receiverOpt: boundDisposableVar, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method: disposeMethod);
709return BoundCall.Synthesized(
718return BoundCall.Synthesized(
1094BoundExpression currentDimensionUpperBound = BoundCall.Synthesized(forEachSyntax, boundArrayVar, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getUpperBoundMethod, dimensionArgument);
1148BoundExpression currentDimensionLowerBound = BoundCall.Synthesized(forEachSyntax, boundArrayVar, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getLowerBoundMethod, dimensionArgument);
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (5)
142return BoundCall.Synthesized(rewrittenLeft.Syntax, rewrittenLeft, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefault);
149return BoundCall.Synthesized(rewrittenLeft.Syntax, rewrittenLeft, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefaultDefaultValue, rewrittenRight);
197var boundCall = (BoundCall)expression;
258rewrittenLeft = BoundCall.Synthesized(rewrittenLeft.Syntax, rewrittenLeft, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefault);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (12)
196return BoundCall.Synthesized(originalSyntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, finalArguments);
222not (BoundCall or BoundConversion { ConversionKind: ConversionKind.Boxing, Type.SpecialType: SpecialType.System_Object, Operand.Type.SpecialType: SpecialType.System_Char })
290else if (argument is BoundCall call)
366public bool IsWellKnownConcatMethod(BoundCall call, out ImmutableArray<BoundExpression> arguments)
394public bool IsCharToString(BoundCall call, [NotNullWhen(true)] out BoundExpression? charExpression)
416private readonly bool IsConcatNonArray(BoundCall call, ref MethodSymbol? concatMethod, SpecialMember concatSpecialMember, out ImmutableArray<BoundExpression> arguments)
507args[i] = BoundCall.Synthesized(arg.Syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, stringImplicitConversionToReadOnlySpan, arg);
511var concatCall = BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, spanConcat, args.ToImmutableAndFree());
646return BoundCall.Synthesized(syntax, expr, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, structToStringMethod);
671return BoundCall.Synthesized(syntax, expr, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, objectToStringMethod);
699whenNotNull: BoundCall.Synthesized(
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (15)
117return BoundCall.Synthesized(
170return BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, loweredOperand);
211BoundExpression call_GetValueOrDefault = BoundCall.Synthesized(syntax, boundTemp, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefault);
415return BoundCall.Synthesized(syntax,
442BoundCall.Synthesized(syntax,
481BoundCall increment = makeIncrementCall(syntax, boundTemp, rightOpt, operatorMethod);
497BoundCall increment = makeIncrementCall(syntax, boundTemp, rightOpt, operatorMethod);
523static BoundCall makeIncrementCall(SyntaxNode syntax, BoundLocal boundTemp, BoundExpression? rightOpt, MethodSymbol operatorMethod)
525return BoundCall.Synthesized(syntax, boundTemp, initialBindingReceiverIsSubjectToCloning: ThreeState.False, operatorMethod, rightOpt is null ? [] : [rightOpt]);
810return BoundCall.Synthesized(
837BoundExpression call_GetValueOrDefault = BoundCall.Synthesized(syntax, boundTemp, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefault);
840BoundExpression userDefinedCall = BoundCall.Synthesized(
987return BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, operand);
1002BoundExpression getValueCall = BoundCall.Synthesized(syntax, operand, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, getValueOrDefault);
1004BoundExpression methodCall = BoundCall.Synthesized(syntax, receiverOpt: null, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, getValueCall);
Lowering\SyntheticBoundNodeFactory.cs (8)
837public BoundCall Call(BoundExpression? receiver, MethodSymbol method)
842public BoundCall Call(BoundExpression? receiver, MethodSymbol method, BoundExpression arg0, bool useStrictArgumentRefKinds = false)
847public BoundCall Call(BoundExpression? receiver, MethodSymbol method, BoundExpression arg0, BoundExpression arg1, bool useStrictArgumentRefKinds = false)
852public BoundCall Call(BoundExpression? receiver, MethodSymbol method, params BoundExpression[] args)
857public BoundCall Call(BoundExpression? receiver, WellKnownMember method, BoundExpression arg0)
860public BoundCall Call(BoundExpression? receiver, MethodSymbol method, ImmutableArray<BoundExpression> args, bool useStrictArgumentRefKinds = false)
902public BoundCall Call(BoundExpression? receiver, MethodSymbol method, ImmutableArray<RefKind> refKinds, ImmutableArray<BoundExpression> args)
1814return BoundCall.Synthesized(