14 instantiations of BoundReturnStatement
Microsoft.CodeAnalysis.CSharp (14)
BoundTree\Constructors.cs (1)
633return new BoundReturnStatement(syntax, refKind, expression, hasErrors) { WasCompilerGenerated = true };
Compiler\MethodBodySynthesizer.cs (3)
193statement = new BoundReturnStatement(accessor.SyntaxNode, RefKind.None, fieldAccess, @checked: false); 321BoundStatement returnStatement = new BoundReturnStatement(syntax, RefKind.None, expressionOpt: null, @checked: false); 357BoundStatement @return = new BoundReturnStatement(syntax,
FlowAnalysis\FlowAnalysisPass.cs (1)
85var newStatements = block.Statements.Add(new BoundReturnStatement(trailingExpression.Syntax, RefKind.None, trailingExpression, @checked: false));
Generated\BoundNodes.xml.Generated.cs (1)
3588var result = new BoundReturnStatement(this.Syntax, refKind, expressionOpt, @checked, this.HasErrors);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (1)
335unpendReturn = new BoundReturnStatement(_F.Syntax, RefKind.None, pendingValue, @checked: false);
Lowering\ClosureConversion\ClosureConversion.cs (1)
562new BoundReturnStatement(syntax, RefKind.None, null, @checked: false));
Lowering\InitializerRewriter.cs (1)
68boundStatements.Add(new BoundReturnStatement(lastStatement.Syntax, RefKind.None, trailingExpression, @checked: false));
Lowering\SyntheticBoundNodeFactory.cs (1)
566return new BoundReturnStatement(Syntax, CurrentFunction.RefKind, expression, @checked: false) { WasCompilerGenerated = true };
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (4)
409new BoundReturnStatement( 427new BoundReturnStatement( 520new BoundReturnStatement( 611var returnStatement = new BoundReturnStatement(
72 references to BoundReturnStatement
Microsoft.CodeAnalysis.CSharp (72)
Binder\Binder_Query.cs (2)
682var r1 = l1 != null ? l1.Body.Statements[0] as BoundReturnStatement : null;
Binder\RefSafetyAnalysis.cs (1)
518public override BoundNode? VisitReturnStatement(BoundReturnStatement node)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (7)
3273var returnStmt = (BoundReturnStatement)lambda.Body.Statements[0]; 3287var returnStatements = ArrayBuilder<BoundReturnStatement>.GetInstance(); 3293foreach (BoundReturnStatement r in returnStatements) 3354private readonly ArrayBuilder<BoundReturnStatement> _returns; 3356public ReturnStatements(ArrayBuilder<BoundReturnStatement> returns) 3382public override BoundNode VisitReturnStatement(BoundReturnStatement node)
BoundTree\BoundNode_Source.cs (1)
148case BoundReturnStatement returnStatement:
BoundTree\BoundTreeVisitors.cs (1)
82return VisitReturnStatement(node as BoundReturnStatement, arg);
BoundTree\Constructors.cs (1)
631public static BoundReturnStatement Synthesized(SyntaxNode syntax, RefKind refKind, BoundExpression expression, bool hasErrors = false)
BoundTree\UnboundLambda.cs (11)
144var returnTypes = ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>.GetInstance(); 185internal static InferredLambdaReturnType InferReturnType(ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)> returnTypes, 192internal static InferredLambdaReturnType InferReturnType(ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)> returnTypes, 202private static InferredLambdaReturnType InferReturnTypeImpl(ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)> returnTypes, 340private readonly ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)> _builder; 342private BlockReturns(ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)> builder) 347public static void GetReturnTypes(ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)> builder, BoundBlock block) 374public override BoundNode? VisitReturnStatement(BoundReturnStatement node) 719var returnTypes = ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>.GetInstance(); 954var returnTypes = ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>.GetInstance(); 1571statements[0] is BoundReturnStatement { RefKind: Microsoft.CodeAnalysis.RefKind.None, ExpressionOpt: BoundExpression expr })
CodeGen\EmitStatement.cs (3)
68EmitReturnStatement((BoundReturnStatement)statement); 855private bool CanHandleReturnLabel(BoundReturnStatement boundReturnStatement) 862private void EmitReturnStatement(BoundReturnStatement boundReturnStatement)
CodeGen\Optimizer.cs (1)
1795public override BoundNode VisitReturnStatement(BoundReturnStatement node)
Compiler\MethodBodySynthesizer.cs (1)
311BoundStatement returnStatement = BoundReturnStatement.Synthesized(syntax, RefKind.None, processHandlerCall);
FlowAnalysis\AbstractFlowPass.cs (2)
2016public override BoundNode VisitReturnStatement(BoundReturnStatement node) 2024protected virtual BoundNode VisitReturnStatementNoAdjust(BoundReturnStatement node)
FlowAnalysis\FlowAnalysisPass.cs (1)
202: BoundReturnStatement.Synthesized(syntax, RefKind.None, null);
FlowAnalysis\NullableWalker.cs (9)
204private ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>? _returnTypesOpt; 459ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>? returnTypesOpt, 611if (pendingReturn.Branch is BoundReturnStatement returnStatement) 999private void EnforceMemberNotNullWhenForPendingReturn(PendingBranch pendingReturn, BoundReturnStatement returnStatement) 1153private void EnforceNotNullWhenForPendingReturn(PendingBranch pendingReturn, BoundReturnStatement returnStatement) 1686ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>? returnTypesOpt) 1732ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>? returnTypesOpt, 2878public sealed override BoundNode? VisitReturnStatement(BoundReturnStatement node) 3303if (pendingReturn.Branch is BoundReturnStatement returnStatement)
Generated\BoundNodes.xml.Generated.cs (8)
3584public BoundReturnStatement Update(RefKind refKind, BoundExpression? expressionOpt, bool @checked) 3588var result = new BoundReturnStatement(this.Syntax, refKind, expressionOpt, @checked, this.HasErrors); 9015return VisitReturnStatement((BoundReturnStatement)node, arg); 9395public virtual R VisitReturnStatement(BoundReturnStatement node, A arg) => this.DefaultVisit(node, arg); 9631public virtual BoundNode? VisitReturnStatement(BoundReturnStatement node) => this.DefaultVisit(node); 10114public override BoundNode? VisitReturnStatement(BoundReturnStatement node) 11324public override BoundNode? VisitReturnStatement(BoundReturnStatement node) 15768public override TreeDumperNode VisitReturnStatement(BoundReturnStatement node, object? arg) => new TreeDumperNode("returnStatement", null, new TreeDumperNode[]
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (1)
374public override BoundNode VisitReturnStatement(BoundReturnStatement node)
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
642public sealed override BoundNode VisitReturnStatement(BoundReturnStatement node)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (2)
351var returnStatement = F.Return(F.New(valueTaskT_ctor, F.This(), versionLocal)); 456var returnStatement = F.Return(F.New(valueTask_ctor, F.This(), F.Call(F.InstanceField(_promiseOfValueOrEndField), promise_get_Version)));
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
141var result = Visit(((BoundReturnStatement)stmt).ExpressionOpt);
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
394public override BoundStatement InstrumentReturnStatement(BoundReturnStatement original, BoundStatement rewritten) 411private static bool ReturnsValueWithinExpressionBodiedConstruct(BoundReturnStatement returnStatement)
Lowering\Instrumentation\CompoundInstrumenter.cs (1)
188public override BoundStatement InstrumentReturnStatement(BoundReturnStatement original, BoundStatement rewritten)
Lowering\Instrumentation\DebugInfoInjector.cs (1)
402public override BoundStatement InstrumentReturnStatement(BoundReturnStatement original, BoundStatement rewritten)
Lowering\Instrumentation\Instrumenter.cs (1)
263public virtual BoundStatement InstrumentReturnStatement(BoundReturnStatement original, BoundStatement rewritten)
Lowering\LocalRewriter\LocalRewriter_ReturnStatement.cs (1)
13public override BoundNode VisitReturnStatement(BoundReturnStatement node)
Lowering\SpillSequenceSpiller.cs (1)
693public override BoundNode VisitReturnStatement(BoundReturnStatement node)
Lowering\SyntheticBoundNodeFactory.cs (1)
543public BoundReturnStatement Return(BoundExpression? expression = null)
Operations\CSharpOperationFactory.cs (3)
195return CreateBoundReturnStatementOperation((BoundReturnStatement)boundNode); 1071((boundOperand as BoundLambda)?.Body.Statements.SingleOrDefault() as BoundReturnStatement)?. 2056private IReturnOperation CreateBoundReturnStatementOperation(BoundReturnStatement boundReturnStatement)
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
611var returnStatement = new BoundReturnStatement(
Symbols\Synthesized\SynthesizedInlineArrayAsReadOnlySpanMethod.cs (1)
30var body = f.Return(f.Call(null,
Symbols\Synthesized\SynthesizedInlineArrayAsSpanMethod.cs (1)
30var body = f.Return(f.Call(null,
Symbols\Synthesized\SynthesizedInlineArrayElementRefMethod.cs (1)
32var body = f.Return(f.Call(null,
Symbols\Synthesized\SynthesizedInlineArrayElementRefReadOnlyMethod.cs (1)
32var body = f.Return(f.Call(null,
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefMethod.cs (1)
31var body = f.Return(f.Call(null,
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefReadOnlyMethod.cs (1)
31var body = f.Return(f.Call(null,