32 types derived from BoundStatement
Microsoft.CodeAnalysis.CSharp (32)
Generated\BoundNodes.xml.Generated.cs (32)
998internal sealed partial class BoundBadStatement : BoundStatement 1026internal sealed partial class BoundExtractedFinallyBlock : BoundStatement 3034internal sealed partial class BoundSequencePoint : BoundStatement 3059internal sealed partial class BoundSequencePointWithSpan : BoundStatement 3086internal sealed partial class BoundSavePreviousSequencePoint : BoundStatement 3123internal sealed partial class BoundRestorePreviousSequencePoint : BoundStatement 3160internal sealed partial class BoundStepThroughSequencePoint : BoundStatement 3256internal sealed partial class BoundStateMachineScope : BoundStatement 3287internal sealed partial class BoundLocalDeclaration : BoundStatement 3323internal abstract partial class BoundMultipleLocalDeclarationsBase : BoundStatement 3393internal sealed partial class BoundLocalFunctionStatement : BoundStatement 3425internal sealed partial class BoundNoOpStatement : BoundStatement 3456internal sealed partial class BoundReturnStatement : BoundStatement 3485internal sealed partial class BoundYieldReturnStatement : BoundStatement 3513internal sealed partial class BoundYieldBreakStatement : BoundStatement 3530internal sealed partial class BoundThrowStatement : BoundStatement 3555internal sealed partial class BoundExpressionStatement : BoundStatement 3583internal sealed partial class BoundBreakStatement : BoundStatement 3620internal sealed partial class BoundContinueStatement : BoundStatement 3657internal sealed partial class BoundSwitchStatement : BoundStatement 3702internal sealed partial class BoundSwitchDispatch : BoundStatement 3738internal sealed partial class BoundIfStatement : BoundStatement 3771internal abstract partial class BoundLoopStatement : BoundStatement 4005internal sealed partial class BoundUsingStatement : BoundStatement 4044internal sealed partial class BoundFixedStatement : BoundStatement 4078internal sealed partial class BoundLockStatement : BoundStatement 4109internal sealed partial class BoundTryStatement : BoundStatement 4559internal sealed partial class BoundLabelStatement : BoundStatement 4596internal sealed partial class BoundGotoStatement : BoundStatement 4628internal sealed partial class BoundLabeledStatement : BoundStatement 4696internal partial class BoundStatementList : BoundStatement 4733internal sealed partial class BoundConditionalGoto : BoundStatement
1161 references to BoundStatement
Microsoft.CodeAnalysis.CSharp (1145)
Binder\Binder.cs (4)
860internal BoundStatement WrapWithVariablesIfAny(CSharpSyntaxNode scopeDesignator, BoundStatement statement) 876internal BoundStatement WrapWithVariablesAndLocalFunctionsIfAny(CSharpSyntaxNode scopeDesignator, BoundStatement statement)
Binder\Binder_Initializers.cs (3)
20internal BoundStatement? LoweredInitializers { get; set; } 250var statement = binder.BindStatement(statementNode, diagnostics); 270var labeledStatementBody = ((BoundLabeledStatement)statement).Body;
Binder\Binder_Statements.cs (51)
39public virtual BoundStatement BindStatement(StatementSyntax node, BindingDiagnosticBag diagnostics) 59BoundStatement result; 164private BoundStatement BindCheckedStatement(CheckedStatementSyntax node, BindingDiagnosticBag diagnostics) 169private BoundStatement BindUnsafeStatement(UnsafeStatementSyntax node, BindingDiagnosticBag diagnostics) 187private BoundStatement BindFixedStatement(FixedStatementSyntax node, BindingDiagnosticBag diagnostics) 197private BoundStatement BindFixedStatementParts(FixedStatementSyntax node, BindingDiagnosticBag diagnostics) 208BoundStatement boundBody = BindPossibleEmbeddedStatement(node.Statement, diagnostics); 235private BoundStatement BindYieldReturnStatement(YieldStatementSyntax node, BindingDiagnosticBag diagnostics) 276private BoundStatement BindYieldBreakStatement(YieldStatementSyntax node, BindingDiagnosticBag diagnostics) 292private BoundStatement BindLockStatement(LockStatementSyntax node, BindingDiagnosticBag diagnostics) 299internal virtual BoundStatement BindLockStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 304private BoundStatement BindUsingStatement(UsingStatementSyntax node, BindingDiagnosticBag diagnostics) 311internal virtual BoundStatement BindUsingStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 316internal BoundStatement BindPossibleEmbeddedStatement(StatementSyntax node, BindingDiagnosticBag diagnostics) 431private BoundStatement BindThrow(ThrowStatementSyntax node, BindingDiagnosticBag diagnostics) 461private static BoundStatement BindEmpty(EmptyStatementSyntax node) 503var body = BindStatement(node.Statement, diagnostics); 507private BoundStatement BindGoto(GotoStatementSyntax node, BindingDiagnosticBag diagnostics) 551private BoundStatement BindLocalFunctionStatement(LocalFunctionStatementSyntax node, BindingDiagnosticBag diagnostics) 639public BoundStatement BindExpressionStatement(ExpressionStatementSyntax node, BindingDiagnosticBag diagnostics) 683internal BoundStatement BindLocalDeclarationStatement(LocalDeclarationStatementSyntax node, BindingDiagnosticBag diagnostics) 695private BoundStatement BindUsingDeclarationStatementParts(LocalDeclarationStatementSyntax node, BindingDiagnosticBag diagnostics) 697var usingDeclaration = UsingStatementBinder.BindUsingStatementOrDeclarationFromParts(node, node.UsingKeyword, node.AwaitKeyword, originalBinder: this, usingBinderOpt: null, diagnostics); 702private BoundStatement BindDeclarationStatementParts(LocalDeclarationStatementSyntax node, BindingDiagnosticBag diagnostics) 1872ArrayBuilder<BoundStatement> boundStatements = ArrayBuilder<BoundStatement>.GetInstance(nStatements); 1876var boundStatement = BindStatement(syntaxStatements[i], diagnostics); 1883private BoundBlock FinishBindBlockParts(CSharpSyntaxNode node, ImmutableArray<BoundStatement> boundStatements) 2492private BoundStatement BindIfStatement(IfStatementSyntax node, BindingDiagnosticBag diagnostics) 2495var consequence = BindPossibleEmbeddedStatement(node.Statement, diagnostics); 2496BoundStatement alternative = (node.Else == null) ? null : BindPossibleEmbeddedStatement(node.Else.Statement, diagnostics); 2498BoundStatement result = new BoundIfStatement(node, condition, consequence, alternative); 2637private BoundStatement BindSwitchStatement(SwitchStatementSyntax node, BindingDiagnosticBag diagnostics) 2644internal virtual BoundStatement BindSwitchStatementCore(SwitchStatementSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 2654private BoundStatement BindWhile(WhileStatementSyntax node, BindingDiagnosticBag diagnostics) 2668private BoundStatement BindDo(DoStatementSyntax node, BindingDiagnosticBag diagnostics) 2693internal BoundStatement BindForOrUsingOrFixedDeclarations(VariableDeclarationSyntax nodeOpt, LocalDeclarationKind localKind, BindingDiagnosticBag diagnostics, out ImmutableArray<BoundLocalDeclaration> declarations) 2750(BoundStatement)declarations[0] : 2754internal BoundStatement BindStatementExpressionList(SeparatedSyntaxList<ExpressionSyntax> statements, BindingDiagnosticBag diagnostics) 2768var statementBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 2779private BoundStatement BindForEach(CommonForEachStatementSyntax node, BindingDiagnosticBag diagnostics) 2785internal virtual BoundStatement BindForEachParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 2793internal virtual BoundStatement BindForEachDeconstruction(BindingDiagnosticBag diagnostics, Binder originalBinder) 2798private BoundStatement BindBreak(BreakStatementSyntax node, BindingDiagnosticBag diagnostics) 2809private BoundStatement BindContinue(ContinueStatementSyntax node, BindingDiagnosticBag diagnostics) 2886private BoundStatement BindReturn(ReturnStatementSyntax syntax, BindingDiagnosticBag diagnostics) 3351BoundStatement statement; 3554ArrayBuilder<BoundStatement> boundStatements = ArrayBuilder<BoundStatement>.GetInstance(); 3566var boundStatement = BindStatement(topLevelStatement.Statement, diagnostics); 3599blockBody: new BoundBlock(typeDecl, ImmutableArray<LocalSymbol>.Empty, ImmutableArray<BoundStatement>.Empty).MakeCompilerGenerated(),
Binder\BuckStopsHereBinder.cs (5)
186internal override BoundStatement BindSwitchStatementCore(SwitchStatementSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 216internal override BoundStatement BindForEachParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 222internal override BoundStatement BindForEachDeconstruction(BindingDiagnosticBag diagnostics, Binder originalBinder) 240internal override BoundStatement BindUsingStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 246internal override BoundStatement BindLockStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder)
Binder\ForEachLoopBinder.cs (3)
164internal override BoundStatement BindForEachParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 173internal override BoundStatement BindForEachDeconstruction(BindingDiagnosticBag diagnostics, Binder originalBinder) 397BoundStatement body = originalBinder.BindPossibleEmbeddedStatement(_syntax.Statement, diagnostics);
Binder\ForLoopBinder.cs (3)
71BoundStatement initializer; 101BoundStatement increment = null; 126var body = originalBinder.BindPossibleEmbeddedStatement(node.Statement, diagnostics);
Binder\LockBinder.cs (2)
34internal override BoundStatement BindLockStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 58BoundStatement stmt = originalBinder.BindPossibleEmbeddedStatement(_syntax.Statement, diagnostics);
Binder\SwitchBinder.cs (1)
468internal BoundStatement BindGotoCaseOrDefault(GotoStatementSyntax node, Binder gotoBinder, BindingDiagnosticBag diagnostics)
Binder\SwitchBinder_Patterns.cs (4)
29internal override BoundStatement BindSwitchStatementCore(SwitchStatementSyntax node, Binder originalBinder, BindingDiagnosticBag diagnostics) 200var boundStatementsBuilder = ArrayBuilder<BoundStatement>.GetInstance(node.Statements.Count); 203var boundStatement = sectionBinder.BindStatement(statement, diagnostics); 214internal static bool ContainsUsingVariable(BoundStatement boundStatement)
Binder\UsingStatementBinder.cs (4)
76internal override BoundStatement BindUsingStatementParts(BindingDiagnosticBag diagnostics, Binder originalBinder) 84var boundUsingStatement = BindUsingStatementOrDeclarationFromParts((CSharpSyntaxNode)expressionSyntax ?? declarationSyntax, _syntax.UsingKeyword, _syntax.AwaitKeyword, originalBinder, this, diagnostics); 90internal static BoundStatement BindUsingStatementOrDeclarationFromParts(SyntaxNode syntax, SyntaxToken usingKeyword, SyntaxToken awaitKeyword, Binder originalBinder, UsingStatementBinder? usingBinderOpt, BindingDiagnosticBag diagnostics) 171BoundStatement boundBody = originalBinder.BindPossibleEmbeddedStatement(usingBinderOpt!._syntax.Statement, diagnostics);
Binder\WhileBinder.cs (2)
33var body = originalBinder.BindPossibleEmbeddedStatement(node.Statement, diagnostics); 43var body = originalBinder.BindPossibleEmbeddedStatement(node.Statement, diagnostics);
BoundTree\BoundNode_Source.cs (5)
90foreach (var statement in statements) 104var statement = seqPoint.StatementOpt; 119var statement = seqPoint.StatementOpt; 282foreach (var statement in section.Statements) 307foreach (var statement in list.Statements)
BoundTree\BoundNodeExtensions.cs (1)
39public static bool IsConstructorInitializer(this BoundStatement statement)
BoundTree\BoundSequencePoint.cs (6)
11public static BoundStatement Create(SyntaxNode? syntax, TextSpan? part, BoundStatement statement, bool hasErrors = false) 25public static BoundStatement Create(SyntaxNode? syntax, BoundStatement? statementOpt, bool hasErrors = false, bool wasCompilerGenerated = false) 31public static BoundStatement CreateHidden(BoundStatement? statementOpt = null, bool hasErrors = false)
BoundTree\BoundSpillSequence.cs (2)
26private static ImmutableArray<BoundStatement> MakeStatements(ImmutableArray<BoundExpression> expressions) 28return expressions.SelectAsArray<BoundExpression, BoundStatement>(
BoundTree\BoundStatementExtensions.cs (2)
14internal static void AssertIsLabeledStatement(this BoundStatement node) 28internal static void AssertIsLabeledStatementWithLabel(this BoundStatement node, LabelSymbol label)
BoundTree\Constructors.cs (8)
551public static BoundStatementList Synthesized(SyntaxNode syntax, params BoundStatement[] statements) 556public static BoundStatementList Synthesized(SyntaxNode syntax, bool hasErrors, params BoundStatement[] statements) 561public static BoundStatementList Synthesized(SyntaxNode syntax, ImmutableArray<BoundStatement> statements) 566public static BoundStatementList Synthesized(SyntaxNode syntax, bool hasErrors, ImmutableArray<BoundStatement> statements) 598public BoundBlock(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 603public static BoundBlock SynthesizedNoLocals(SyntaxNode syntax, BoundStatement statement) 609public static BoundBlock SynthesizedNoLocals(SyntaxNode syntax, ImmutableArray<BoundStatement> statements) 614public static BoundBlock SynthesizedNoLocals(SyntaxNode syntax, params BoundStatement[] statements)
CodeGen\CodeGenerator.cs (4)
29private readonly BoundStatement _boundBody; 85BoundStatement boundBody, 381BoundStatement statement = node.StatementOpt; 404BoundStatement statement = node.StatementOpt;
CodeGen\EmitStatement.cs (4)
27private void EmitStatement(BoundStatement statement) 118private int EmitStatementAndCountInstructions(BoundStatement statement) 759private void EmitStatements(ImmutableArray<BoundStatement> statements) 761foreach (var statement in statements)
CodeGen\Optimizer.cs (7)
59public static BoundStatement Optimize( 60BoundStatement src, bool debugFriendly, 67src = (BoundStatement)StackOptimizerPass1.Analyze(src, locals, debugFriendly); 71BoundStatement result; 1972public static BoundStatement Rewrite(BoundStatement src, Dictionary<LocalSymbol, LocalDefUseInfo> info) 1975return (BoundStatement)scheduler.Visit(src);
Compilation\CSharpSemanticModel.cs (1)
2398BoundStatement bound = binder.BindStatement(globalStatement.Statement, diagnostics);
Compilation\MemberSemanticModel.cs (9)
33private Dictionary<SyntaxNode, BoundStatement> _lazyGuardedSynthesizedStatementsMap; 1402private void GuardedAddSynthesizedStatementToMap(StatementSyntax node, BoundStatement statement) 1406_lazyGuardedSynthesizedStatementsMap = new Dictionary<SyntaxNode, BoundStatement>(); 1412private BoundStatement GuardedGetSynthesizedStatementFromMap(StatementSyntax node) 1415_lazyGuardedSynthesizedStatementsMap.TryGetValue(node, out BoundStatement result)) 2382public override BoundStatement BindStatement(StatementSyntax node, BindingDiagnosticBag diagnostics) 2387BoundStatement synthesizedStatement = _semanticModel.GuardedGetSynthesizedStatementFromMap(node); 2398return (BoundStatement)boundNode; 2402BoundStatement statement = base.BindStatement(node, diagnostics);
Compiler\AnonymousTypeMethodBodySynthesizer.cs (4)
34BoundStatement[] statements = new BoundStatement[paramCount + 2]; 121BoundStatement assignment = F.ExpressionStatement(assignmentToTemp); 146BoundStatement retStatement = F.Return(retExpression);
Compiler\MethodBodySynthesizer.cs (22)
22internal static ImmutableArray<BoundStatement> ConstructScriptConstructorBody( 23BoundStatement loweredBody, 42BoundStatement baseConstructorCall = 60var statements = ArrayBuilder<BoundStatement>.GetInstance(); 83ArrayBuilder<BoundStatement> statements, 188BoundStatement statement; 308BoundStatement returnStatement = BoundReturnStatement.Synthesized(syntax, RefKind.None, processHandlerCall); 317BoundStatement callStatement = new BoundExpressionStatement(syntax, processHandlerCall); 318BoundStatement returnStatement = new BoundReturnStatement(syntax, RefKind.None, expressionOpt: null, @checked: false); 354BoundStatement @return = new BoundReturnStatement(syntax, 403BoundStatement eventUpdate = new BoundExpressionStatement(syntax, 412statements: ImmutableArray.Create<BoundStatement>( 435BoundStatement tmp0Init = new BoundExpressionStatement(syntax, 444BoundStatement loopStart = new BoundLabelStatement(syntax, 449BoundStatement tmp1Update = new BoundExpressionStatement(syntax, 467BoundStatement tmp2Update = new BoundExpressionStatement(syntax, 482BoundStatement tmp0Update = new BoundExpressionStatement(syntax, 503BoundStatement loopEnd = new BoundConditionalGoto(syntax, 511statements: ImmutableArray.Create<BoundStatement>( 536BoundStatement baseFinalizeCall = new BoundExpressionStatement( 559ImmutableArray.Create<BoundStatement>( 567ImmutableArray.Create<BoundStatement>(
Compiler\MethodCompiler.cs (23)
250BoundStatement body = synthesizedEntryPoint.CreateBody(diagnostics); 263var loweredBody = LowerBodyOrInitializer( 747BoundStatement loweredBody = IteratorRewriter.Rewrite(methodWithBody.Body, method, methodOrdinal, stateMachineStateDebugInfoBuilder, variableSlotAllocatorOpt, compilationState, diagnosticsThisMethod, out iteratorStateMachine); 1012body = new BoundBlock(methodSymbol.GetNonNullSyntaxNode(), ImmutableArray<LocalSymbol>.Empty, ImmutableArray<BoundStatement>.Empty) { WasCompilerGenerated = true }; 1215BoundStatement loweredBodyOpt = null; 1258ImmutableArray<BoundStatement> boundStatements; 1266boundStatements = ImmutableArray<BoundStatement>.Empty; 1276var initializers = ArrayBuilder<BoundStatement>.GetInstance(capturedParameters.Count); 1296BoundStatement lowered = LowerBodyOrInitializer( 1401internal static BoundStatement LowerBodyOrInitializer( 1404BoundStatement body, 1428var loweredBody = LocalRewriter.Rewrite( 1472BoundStatement bodyWithoutLambdas = loweredBody; 1495BoundStatement bodyWithoutIterators = IteratorRewriter.Rewrite(bodyWithoutLambdas, method, methodOrdinal, stateMachineStateDebugInfoBuilder, lazyVariableSlotAllocator, compilationState, diagnostics, 1503BoundStatement bodyWithoutAsync = AsyncRewriter.Rewrite(bodyWithoutIterators, method, methodOrdinal, stateMachineStateDebugInfoBuilder, lazyVariableSlotAllocator, compilationState, diagnostics, 1526BoundStatement block, 1895body = new BoundBlock(constructor.Syntax, constructor.Locals, ImmutableArray.Create<BoundStatement>(constructor.Initializer)); 1899body = new BoundBlock(constructor.Syntax, constructor.Locals, ImmutableArray.Create<BoundStatement>(constructor.Initializer, body)); 1946var stmts = ArrayBuilder<BoundStatement>.GetInstance(); 1978var constructorInitializer = BindImplicitConstructorInitializerIfAny(method, compilationState, diagnostics); 1979ImmutableArray<BoundStatement> statements; 1988statements = ImmutableArray<BoundStatement>.Empty; 2271private static BoundStatement BindImplicitConstructorInitializerIfAny(MethodSymbol method, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics)
Compiler\TypeCompilationState.cs (4)
30public readonly BoundStatement Body; 33internal MethodWithBody(MethodSymbol method, BoundStatement body, ImportChain? importChain) 133public void AddSynthesizedMethod(MethodSymbol method, BoundStatement body) 150public void AddMethodWrapper(MethodSymbol method, MethodSymbol wrapper, BoundStatement body)
Emitter\Model\SynthesizedPrivateImplementationDetailsStaticConstructor.cs (4)
33ArrayBuilder<BoundStatement> body = ArrayBuilder<BoundStatement>.GetInstance(); 52BoundStatement payloadInitialization = 73BoundStatement returnStatement = factory.Return();
FlowAnalysis\AbstractFlowPass.cs (20)
93private PooledHashSet<BoundStatement> _labelsSeen; 210_labelsSeen = PooledHashSet<BoundStatement>.GetInstance(); 663protected virtual void VisitStatement(BoundStatement statement) 755protected virtual void NoteBranch(PendingBranch pending, BoundNode gotoStmt, BoundStatement target) 766private bool ResolveBranches(LabelSymbol label, BoundStatement? target) 785protected virtual void ResolveBranch(PendingBranch pending, LabelSymbol label, BoundStatement? target, ref bool labelStateChanged) 804public readonly PooledHashSet<BoundStatement> LabelsSeen; 806public SavedPending(PendingBranchesCollection pendingBranches, PooledHashSet<BoundStatement> labelsSeen) 824_labelsSeen = PooledHashSet<BoundStatement>.GetInstance(); 838foreach (var node in _labelsSeen) 1255private void VisitStatements(ImmutableArray<BoundStatement> statements) 1257foreach (var statement in statements) 1492if (child is BoundStatement) 1494VisitStatement(child as BoundStatement); 1767private void VisitTryBlockWithAnyTransferFunction(BoundStatement tryBlock, BoundTryStatement node, ref TLocalState tryState) 1791protected virtual void VisitTryBlock(BoundStatement tryBlock, BoundTryStatement node, ref TLocalState tryState) 1841private void VisitFinallyBlockWithAnyTransferFunction(BoundStatement finallyBlock, ref TLocalState stateMovedUp) 1865protected virtual void VisitFinallyBlock(BoundStatement finallyBlock, ref TLocalState stateMovedUp) 3007foreach (var statement in node.Statements) 3145protected void VisitLabel(LabelSymbol label, BoundStatement node)
FlowAnalysis\AlwaysAssignedWalker.cs (1)
81protected override void ResolveBranch(PendingBranch pending, LabelSymbol label, BoundStatement target, ref bool labelStateChanged)
FlowAnalysis\ControlFlowPass.cs (4)
240protected override void VisitStatement(BoundStatement statement) 261private void CheckReachable(BoundStatement statement) 274protected override void VisitTryBlock(BoundStatement tryBlock, BoundTryStatement node, ref LocalState tryState) 294protected override void VisitFinallyBlock(BoundStatement finallyBlock, ref LocalState endState)
FlowAnalysis\DataFlowsInWalker.cs (1)
82BoundStatement targetStmt)
FlowAnalysis\DefiniteAssignment.cs (3)
2023foreach (var stmt in block.Statements) 2035foreach (var stmt in block.Statements) 2045foreach (var stmt in block.Statements)
FlowAnalysis\EntryPointsWalker.cs (1)
58protected override void NoteBranch(PendingBranch pending, BoundNode gotoStmt, BoundStatement targetStmt)
FlowAnalysis\FlowAnalysisPass.cs (5)
117var builder = ArrayBuilder<BoundStatement>.GetInstance(implicitlyInitializedFields.Length); 140var initializations = F.HiddenSequencePoint(F.Block(builder.ToImmutableAndFree())); 152var builder = ArrayBuilder<BoundStatement>.GetInstance(n); 180BoundStatement ret = (method.IsIterator && !method.IsAsync) 181? (BoundStatement)BoundYieldBreakStatement.Synthesized(syntax)
FlowAnalysis\NullableWalker.cs (4)
2990foreach (var stmt in block.Statements) 2999foreach (var stmt in block.Statements) 3010foreach (var stmt in block.Statements) 3431protected override void VisitStatement(BoundStatement statement)
Generated\BoundNodes.xml.Generated.cs (144)
386public BoundGlobalStatementInitializer(SyntaxNode syntax, BoundStatement statement, bool hasErrors = false) 395public BoundStatement Statement { get; } 400public BoundGlobalStatementInitializer Update(BoundStatement statement) 2218public BoundBlockInstrumentation(SyntaxNode syntax, LocalSymbol local, BoundStatement prologue, BoundStatement epilogue, bool hasErrors = false) 2232public BoundStatement Prologue { get; } 2233public BoundStatement Epilogue { get; } 2238public BoundBlockInstrumentation Update(LocalSymbol local, BoundStatement prologue, BoundStatement epilogue) 3036public BoundSequencePoint(SyntaxNode syntax, BoundStatement? statementOpt, bool hasErrors = false) 3042public BoundStatement? StatementOpt { get; } 3047public BoundSequencePoint Update(BoundStatement? statementOpt) 3061public BoundSequencePointWithSpan(SyntaxNode syntax, BoundStatement? statementOpt, TextSpan span, bool hasErrors = false) 3068public BoundStatement? StatementOpt { get; } 3074public BoundSequencePointWithSpan Update(BoundStatement? statementOpt, TextSpan span) 3193public BoundBlock(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<LocalFunctionSymbol> localFunctions, bool hasUnsafeModifier, BoundBlockInstrumentation? instrumentation, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 3215public BoundBlock Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<LocalFunctionSymbol> localFunctions, bool hasUnsafeModifier, BoundBlockInstrumentation? instrumentation, ImmutableArray<BoundStatement> statements) 3229public BoundScope(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 3244public BoundScope Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> statements) 3258public BoundStateMachineScope(SyntaxNode syntax, ImmutableArray<StateMachineFieldSymbol> fields, BoundStatement statement, bool hasErrors = false) 3270public BoundStatement Statement { get; } 3275public BoundStateMachineScope Update(ImmutableArray<StateMachineFieldSymbol> fields, BoundStatement statement) 3740public BoundIfStatement(SyntaxNode syntax, BoundExpression condition, BoundStatement consequence, BoundStatement? alternativeOpt, bool hasErrors = false) 3753public BoundStatement Consequence { get; } 3754public BoundStatement? AlternativeOpt { get; } 3759public BoundIfStatement Update(BoundExpression condition, BoundStatement consequence, BoundStatement? alternativeOpt) 3801protected BoundConditionalLoopStatement(BoundKind kind, SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression condition, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors = false) 3818public BoundStatement Body { get; } 3823public BoundDoStatement(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression condition, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors = false) 3839public BoundDoStatement Update(ImmutableArray<LocalSymbol> locals, BoundExpression condition, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel) 3853public BoundWhileStatement(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression condition, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors = false) 3869public BoundWhileStatement Update(ImmutableArray<LocalSymbol> locals, BoundExpression condition, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel) 3883public BoundForStatement(SyntaxNode syntax, ImmutableArray<LocalSymbol> outerLocals, BoundStatement? initializer, ImmutableArray<LocalSymbol> innerLocals, BoundExpression? condition, BoundStatement? increment, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors = false) 3902public BoundStatement? Initializer { get; } 3905public BoundStatement? Increment { get; } 3906public BoundStatement Body { get; } 3911public BoundForStatement Update(ImmutableArray<LocalSymbol> outerLocals, BoundStatement? initializer, ImmutableArray<LocalSymbol> innerLocals, BoundExpression? condition, BoundStatement? increment, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel) 3925public BoundForEachStatement(SyntaxNode syntax, ForEachEnumeratorInfo? enumeratorInfoOpt, BoundValuePlaceholder? elementPlaceholder, BoundExpression? elementConversion, BoundTypeExpression iterationVariableType, ImmutableArray<LocalSymbol> iterationVariables, BoundExpression? iterationErrorExpressionOpt, BoundExpression expression, BoundForEachDeconstructStep? deconstructionOpt, BoundAwaitableInfo? awaitOpt, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors = false) 3957public BoundStatement Body { get; } 3962public BoundForEachStatement Update(ForEachEnumeratorInfo? enumeratorInfoOpt, BoundValuePlaceholder? elementPlaceholder, BoundExpression? elementConversion, BoundTypeExpression iterationVariableType, ImmutableArray<LocalSymbol> iterationVariables, BoundExpression? iterationErrorExpressionOpt, BoundExpression expression, BoundForEachDeconstructStep? deconstructionOpt, BoundAwaitableInfo? awaitOpt, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel) 4007public BoundUsingStatement(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundMultipleLocalDeclarations? declarationsOpt, BoundExpression? expressionOpt, BoundStatement body, BoundAwaitableInfo? awaitOpt, MethodArgumentInfo? patternDisposeInfoOpt, bool hasErrors = false) 4025public BoundStatement Body { get; } 4032public BoundUsingStatement Update(ImmutableArray<LocalSymbol> locals, BoundMultipleLocalDeclarations? declarationsOpt, BoundExpression? expressionOpt, BoundStatement body, BoundAwaitableInfo? awaitOpt, MethodArgumentInfo? patternDisposeInfoOpt) 4046public BoundFixedStatement(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundMultipleLocalDeclarations declarations, BoundStatement body, bool hasErrors = false) 4061public BoundStatement Body { get; } 4066public BoundFixedStatement Update(ImmutableArray<LocalSymbol> locals, BoundMultipleLocalDeclarations declarations, BoundStatement body) 4080public BoundLockStatement(SyntaxNode syntax, BoundExpression argument, BoundStatement body, bool hasErrors = false) 4092public BoundStatement Body { get; } 4097public BoundLockStatement Update(BoundExpression argument, BoundStatement body) 4630public BoundLabeledStatement(SyntaxNode syntax, LabelSymbol label, BoundStatement body, bool hasErrors = false) 4642public BoundStatement Body { get; } 4647public BoundLabeledStatement Update(LabelSymbol label, BoundStatement body) 4698protected BoundStatementList(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 4707public BoundStatementList(SyntaxNode syntax, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 4716public ImmutableArray<BoundStatement> Statements { get; } 4721public BoundStatementList Update(ImmutableArray<BoundStatement> statements) 5547public BoundSwitchSection(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundSwitchLabel> switchLabels, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 5565public BoundSwitchSection Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundSwitchLabel> switchLabels, ImmutableArray<BoundStatement> statements) 5690public BoundSpillSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5706public ImmutableArray<BoundStatement> SideEffects { get; } 5712public BoundSpillSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type) 7399public BoundTypeOrInstanceInitializers(SyntaxNode syntax, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 7411public new BoundTypeOrInstanceInitializers Update(ImmutableArray<BoundStatement> statements) 8412public BoundConstructorMethodBody(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundStatement? initializer, BoundBlock? blockBody, BoundBlock? expressionBody, bool hasErrors = false) 8423public BoundStatement? Initializer { get; } 8428public BoundConstructorMethodBody Update(ImmutableArray<LocalSymbol> locals, BoundStatement? initializer, BoundBlock? blockBody, BoundBlock? expressionBody) 10437BoundStatement statement = (BoundStatement)this.Visit(node.Statement); 10751BoundStatement prologue = (BoundStatement)this.Visit(node.Prologue); 10752BoundStatement epilogue = (BoundStatement)this.Visit(node.Epilogue); 10877BoundStatement? statementOpt = (BoundStatement?)this.Visit(node.StatementOpt); 10882BoundStatement? statementOpt = (BoundStatement?)this.Visit(node.StatementOpt); 10891ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 10896ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 10901BoundStatement statement = (BoundStatement)this.Visit(node.Statement); 10968BoundStatement consequence = (BoundStatement)this.Visit(node.Consequence); 10969BoundStatement? alternativeOpt = (BoundStatement?)this.Visit(node.AlternativeOpt); 10975BoundStatement body = (BoundStatement)this.Visit(node.Body); 10981BoundStatement body = (BoundStatement)this.Visit(node.Body); 10986BoundStatement? initializer = (BoundStatement?)this.Visit(node.Initializer); 10988BoundStatement? increment = (BoundStatement?)this.Visit(node.Increment); 10989BoundStatement body = (BoundStatement)this.Visit(node.Body); 11001BoundStatement body = (BoundStatement)this.Visit(node.Body); 11014BoundStatement body = (BoundStatement)this.Visit(node.Body); 11021BoundStatement body = (BoundStatement)this.Visit(node.Body); 11027BoundStatement body = (BoundStatement)this.Visit(node.Body); 11106BoundStatement body = (BoundStatement)this.Visit(node.Body); 11116ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 11261ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 11285ImmutableArray<BoundStatement> sideEffects = this.VisitList(node.SideEffects); 11572ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 11761BoundStatement? initializer = (BoundStatement?)this.Visit(node.Initializer); 12548BoundStatement prologue = (BoundStatement)this.Visit(node.Prologue); 12549BoundStatement epilogue = (BoundStatement)this.Visit(node.Epilogue); 12889ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 12896ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 12903BoundStatement statement = (BoundStatement)this.Visit(node.Statement); 12939BoundStatement body = (BoundStatement)this.Visit(node.Body); 12947BoundStatement body = (BoundStatement)this.Visit(node.Body); 12955BoundStatement? initializer = (BoundStatement?)this.Visit(node.Initializer); 12957BoundStatement? increment = (BoundStatement?)this.Visit(node.Increment); 12958BoundStatement body = (BoundStatement)this.Visit(node.Body); 12972BoundStatement body = (BoundStatement)this.Visit(node.Body); 12981BoundStatement body = (BoundStatement)this.Visit(node.Body); 12990BoundStatement body = (BoundStatement)this.Visit(node.Body); 13260ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 13303ImmutableArray<BoundStatement> sideEffects = this.VisitList(node.SideEffects); 14378BoundStatement? initializer = (BoundStatement?)this.Visit(node.Initializer);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (22)
107public static BoundStatement Rewrite( 110BoundStatement statement, 128var loweredStatement = (BoundStatement)rewriter.Visit(statement); 140BoundStatement finalizedRegion; 181var catchAndPendException = _F.Try( 200BoundStatement syntheticFinally = syntheticFinallyBlock; 208var statements = ArrayBuilder<BoundStatement>.GetInstance(); 238var bodyStatements = ArrayBuilder<BoundStatement>.GetInstance(); 267ArrayBuilder<BoundStatement> bodyStatements, 283private BoundStatement UnpendBranches( 316BoundStatement unpendReturn; 390private BoundStatement UnpendException(LocalSymbol pendingExceptionLocal) 398BoundStatement rethrow = Rethrow(obj); 410private BoundStatement Rethrow(LocalSymbol obj) 413BoundStatement rethrow = _F.Throw(_F.Local(obj)); 448private BoundStatement RewriteFinalizedRegion(BoundTryStatement node) 462BoundStatement tryWithCatches = _F.Try(rewrittenTry, rewrittenCatches); 580var prologueBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 608var handlerStatements = ArrayBuilder<BoundStatement>.GetInstance(); 622handlerStatements.Add((BoundStatement)this.Visit(node.Body)); 733public AwaitInFinallyAnalysis(BoundStatement body)
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (19)
78protected override BoundStatement? GenerateMissingStateDispatch() 80var asyncDispatch = base.GenerateMissingStateDispatch(); 82var iteratorDispatch = _iteratorStateAllocator.GenerateThrowMissingStateDispatch(F, F.Local(cachedState), CodeAnalysisResources.EncCannotResumeSuspendedIteratorMethod); 91protected override BoundStatement GenerateSetResultCall() 107var builder = ArrayBuilder<BoundStatement>.GetInstance(); 152private void AddDisposeCombinedTokensIfNeeded(ArrayBuilder<BoundStatement> builder) 168protected override BoundStatement GenerateSetExceptionCall(LocalSymbol exceptionLocal) 170var builder = ArrayBuilder<BoundStatement>.GetInstance(); 190private BoundStatement GenerateJumpToCurrentDisposalLabel() 200private BoundStatement AppendJumpToCurrentDisposalLabel(BoundStatement node) 230protected override BoundStatement VisitBody(BoundStatement body) 240var rewrittenBody = (BoundStatement)Visit(body); 268var blockBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 362var result = (BoundStatement)base.VisitTryStatement(node); 397BoundStatement result = VisitFinally(extractedFinally.FinallyBlock);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (21)
134internal void GenerateMoveNext(BoundStatement body, MethodSymbol moveNextMethod) 137BoundStatement rewrittenBody = VisitBody(body); 142var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 194var newBody = 217protected virtual BoundStatement GenerateTopLevelTry(BoundBlock tryBlock, ImmutableArray<BoundCatchBlock> catchBlocks) 220protected virtual BoundStatement GenerateSetResultCall() 246BoundStatement assignFinishedState = 250BoundStatement callSetException = GenerateSetExceptionCall(exceptionLocal); 267protected BoundStatement GenerateHoistedLocalsCleanup(ImmutableArray<StateMachineFieldSymbol> hoistedLocals) 269var builder = ArrayBuilder<BoundStatement>.GetInstance(); 289protected virtual BoundStatement GenerateSetExceptionCall(LocalSymbol exceptionLocal) 301protected sealed override BoundStatement GenerateReturn(bool finished) 308protected virtual BoundStatement VisitBody(BoundStatement body) 309=> (BoundStatement)Visit(body); 327return (expr != null) ? node.Update(expr) : (BoundStatement)F.StatementList(); 391BoundStatement getResultStatement = resultPlace != null && !type.IsVoidType() ? 463var blockBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 514private BoundStatement GenerateAwaitOnCompletedDynamic(LocalSymbol awaiterTemp) 541var blockBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 594private BoundStatement GenerateAwaitOnCompleted(TypeSymbol loweredAwaiterType, LocalSymbol awaiterTemp)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (15)
35BoundStatement body, 163var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 200protected override void InitializeStateMachine(ArrayBuilder<BoundStatement> bodyBuilder, NamedTypeSymbol frameType, LocalSymbol stateMachineLocal) 210protected override BoundStatement InitializeParameterField(MethodSymbol getEnumeratorMethod, ParameterSymbol parameter, BoundExpression resultParameter, BoundExpression parameterProxy) 212BoundStatement result; 262protected override BoundStatement GenerateStateMachineCreation(LocalSymbol stateMachineVariable, NamedTypeSymbol frameType, IReadOnlyDictionary<Symbol, CapturedSymbolReplacement> proxies) 264var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 325out BoundStatement instAssignment, 329BoundStatement ifFinished = F.If( 340var ifPromiseReady = F.If( 367private void GetPartsForStartingMachine(out BoundExpressionStatement callReset, out LocalSymbol instSymbol, out BoundStatement instAssignment, 435out BoundStatement instAssignment, 439BoundStatement ifInvalidState = F.If( 445BoundStatement ifFinished = F.If( 662protected override void GenerateResetInstance(ArrayBuilder<BoundStatement> builder, StateMachineState initialState)
Lowering\AsyncRewriter\AsyncRewriter.cs (6)
24BoundStatement body, 41internal static BoundStatement Rewrite( 42BoundStatement bodyWithAwaitLifted, 202protected override void InitializeStateMachine(ArrayBuilder<BoundStatement> bodyBuilder, NamedTypeSymbol frameType, LocalSymbol stateMachineLocal) 214protected override BoundStatement GenerateStateMachineCreation(LocalSymbol stateMachineVariable, NamedTypeSymbol frameType, IReadOnlyDictionary<Symbol, CapturedSymbolReplacement> proxies) 226var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\ClosureConversion\ClosureConversion.cs (27)
62/// a (<see cref="MethodSymbol"/>, <see cref="BoundStatement"/>) pair for each generated method. 66/// (<see cref="MethodSymbol"/>, <see cref="BoundStatement"/>) pairs for additional methods that the lambda rewriter produced. 135private ArrayBuilder<BoundStatement> _addedStatements; 223public static BoundStatement Rewrite( 224BoundStatement loweredBody, 267var body = rewriter.AddStatementsIfNeeded( 268(BoundStatement)rewriter.Visit(loweredBody)); 291private BoundStatement AddStatementsIfNeeded(BoundStatement body) 624private static void InsertAndFreePrologue<T>(ArrayBuilder<BoundStatement> result, ArrayBuilder<T> prologue) where T : BoundNode 628if (node is BoundStatement stmt) 1152var newStatements = ArrayBuilder<BoundStatement>.GetInstance(); 1161foreach (var statement in node.Statements) 1163var replacement = (BoundStatement)this.Visit(statement); 1173var newPrologue = (BoundStatement)Visit(newInstrumentation.Prologue); 1174var newEpilogue = (BoundStatement)Visit(newInstrumentation.Epilogue); 1241var prologueBuilder = ArrayBuilder<BoundStatement>.GetInstance(prologue.Count); 1296var newStatements = ArrayBuilder<BoundStatement>.GetInstance(); 1299foreach (var s in node.Statements) 1301newStatements.Add((BoundStatement)this.Visit(s)); 1558var body = AddStatementsIfNeeded((BoundStatement)VisitBlock(block)); 1576private void AddSynthesizedMethod(MethodSymbol method, BoundStatement body) 1694if (_addedStatements == null) _addedStatements = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
136foreach (var s in block.Statements) 138for (var stmt = s; stmt != null;)
Lowering\InitializerRewriter.cs (6)
33var boundStatements = ArrayBuilder<BoundStatement>.GetInstance(boundInitializers.Length); 36BoundStatement lastStatement = null; 82internal static BoundExpression GetTrailingScriptExpression(BoundStatement statement) 89private static BoundStatement RewriteFieldInitializer(BoundFieldEqualsValue fieldInit) 97BoundStatement boundStatement = 119private static BoundStatement RewriteInitializersAsStatements(BoundInitializer initializer)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (60)
27private readonly BoundStatement _methodBody; 32private readonly BoundStatement? _methodEntryInstrumentation; 41BoundStatement methodBody, 103BoundStatement methodBody, 237public override void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation) 239base.InstrumentBlock(original, rewriter, ref additionalLocals, out var previousPrologue, out epilogue, out instrumentation); 261BoundStatement payloadInitialization = 276BoundStatement createPayloadCall = 296BoundStatement payloadIf = _methodBodyFactory.If(payloadNullTest, createPayloadCall); 300var prologueStatements = ArrayBuilder<BoundStatement>.GetInstance(2 + (_methodEntryInstrumentation != null ? 1 : 0) + (previousPrologue != null ? 1 : 0)); 319public override BoundStatement InstrumentNoOpStatement(BoundNoOpStatement original, BoundStatement rewritten) 324public override BoundStatement InstrumentBreakStatement(BoundBreakStatement original, BoundStatement rewritten) 329public override BoundStatement InstrumentContinueStatement(BoundContinueStatement original, BoundStatement rewritten) 334public override BoundStatement InstrumentExpressionStatement(BoundExpressionStatement original, BoundStatement rewritten) 339public override BoundStatement InstrumentFieldOrPropertyInitializer(BoundStatement original, BoundStatement rewritten) 344public override BoundStatement InstrumentGotoStatement(BoundGotoStatement original, BoundStatement rewritten) 349public override BoundStatement InstrumentThrowStatement(BoundThrowStatement original, BoundStatement rewritten) 354public override BoundStatement InstrumentYieldBreakStatement(BoundYieldBreakStatement original, BoundStatement rewritten) 359public override BoundStatement InstrumentYieldReturnStatement(BoundYieldReturnStatement original, BoundStatement rewritten) 364public override BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 369public override BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 374public override BoundStatement InstrumentIfStatement(BoundIfStatement original, BoundStatement rewritten) 379public override BoundStatement InstrumentWhileStatementConditionalGotoStartOrBreak(BoundWhileStatement original, BoundStatement ifConditionGotoStart) 384public override BoundStatement InstrumentUserDefinedLocalInitialization(BoundLocalDeclaration original, BoundStatement rewritten) 389public override BoundStatement InstrumentLockTargetCapture(BoundLockStatement original, BoundStatement lockTargetCapture) 394public override BoundStatement InstrumentReturnStatement(BoundReturnStatement original, BoundStatement rewritten) 432public override BoundStatement InstrumentSwitchStatement(BoundSwitchStatement original, BoundStatement rewritten) 437public override BoundStatement InstrumentSwitchWhenClauseConditionalGotoBody(BoundExpression original, BoundStatement ifConditionGotoBody) 450public override BoundStatement InstrumentUsingTargetCapture(BoundUsingStatement original, BoundStatement usingTargetCapture) 455private BoundStatement AddDynamicAnalysis(BoundStatement original, BoundStatement rewritten) 469private BoundStatement CollectDynamicAnalysis(BoundStatement original, BoundStatement rewritten) 493private BoundStatement AddAnalysisPoint(SyntaxNode syntaxForSpan, Text.TextSpan alternateSpan, SyntheticBoundNodeFactory statementFactory) 498private BoundStatement AddAnalysisPoint(SyntaxNode syntaxForSpan, SyntheticBoundNodeFactory statementFactory) 503private BoundStatement AddAnalysisPoint(SyntaxNode syntaxForSpan, FileLinePositionSpan span, SyntheticBoundNodeFactory statementFactory) 523private static SyntaxNode SyntaxForSpan(BoundStatement statement)
Lowering\Instrumentation\CompoundInstrumenter.cs (56)
37public override BoundStatement InstrumentNoOpStatement(BoundNoOpStatement original, BoundStatement rewritten) 42public override BoundStatement InstrumentYieldBreakStatement(BoundYieldBreakStatement original, BoundStatement rewritten) 47public override BoundStatement InstrumentYieldReturnStatement(BoundYieldReturnStatement original, BoundStatement rewritten) 52public override BoundStatement InstrumentThrowStatement(BoundThrowStatement original, BoundStatement rewritten) 57public override BoundStatement InstrumentContinueStatement(BoundContinueStatement original, BoundStatement rewritten) 62public override BoundStatement InstrumentGotoStatement(BoundGotoStatement original, BoundStatement rewritten) 67public override BoundStatement InstrumentExpressionStatement(BoundExpressionStatement original, BoundStatement rewritten) 72public override BoundStatement InstrumentFieldOrPropertyInitializer(BoundStatement original, BoundStatement rewritten) 77public override BoundStatement InstrumentBreakStatement(BoundBreakStatement original, BoundStatement rewritten) 87public override void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation) 97public override BoundStatement InstrumentDoStatementConditionalGotoStart(BoundDoStatement original, BoundStatement ifConditionGotoStart) 102public override BoundStatement? InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, BoundStatement? collectionVarDecl) 107public override BoundStatement InstrumentForEachStatement(BoundForEachStatement original, BoundStatement rewritten) 112public override BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 117public override BoundStatement InstrumentForStatementConditionalGotoStartOrBreak(BoundForStatement original, BoundStatement branchBack) 122public override BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack) 132public override BoundStatement InstrumentIfStatement(BoundIfStatement original, BoundStatement rewritten) 142public override BoundStatement InstrumentLabelStatement(BoundLabeledStatement original, BoundStatement rewritten) 147public override BoundStatement InstrumentUserDefinedLocalInitialization(BoundLocalDeclaration original, BoundStatement rewritten) 172public override BoundStatement InstrumentLockTargetCapture(BoundLockStatement original, BoundStatement lockTargetCapture) 177public override BoundStatement InstrumentReturnStatement(BoundReturnStatement original, BoundStatement rewritten) 182public override BoundStatement InstrumentSwitchStatement(BoundSwitchStatement original, BoundStatement rewritten) 187public override BoundStatement InstrumentSwitchWhenClauseConditionalGotoBody(BoundExpression original, BoundStatement ifConditionGotoBody) 192public override BoundStatement InstrumentUsingTargetCapture(BoundUsingStatement original, BoundStatement usingTargetCapture) 202public override BoundStatement InstrumentWhileStatementConditionalGotoStartOrBreak(BoundWhileStatement original, BoundStatement ifConditionGotoStart) 226public override BoundExpression InstrumentSwitchStatementExpression(BoundStatement original, BoundExpression rewrittenExpression, SyntheticBoundNodeFactory factory) 236public override BoundStatement InstrumentSwitchBindCasePatternVariables(BoundStatement bindings) 241public override BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl)
Lowering\Instrumentation\DebugInfoInjector.cs (61)
40public override BoundStatement InstrumentNoOpStatement(BoundNoOpStatement original, BoundStatement rewritten) 45public override BoundStatement InstrumentBreakStatement(BoundBreakStatement original, BoundStatement rewritten) 50public override BoundStatement InstrumentContinueStatement(BoundContinueStatement original, BoundStatement rewritten) 55public override BoundStatement InstrumentExpressionStatement(BoundExpressionStatement original, BoundStatement rewritten) 78public override BoundStatement InstrumentFieldOrPropertyInitializer(BoundStatement original, BoundStatement rewritten) 92private static BoundStatement InstrumentFieldOrPropertyInitializer(BoundStatement rewritten, SyntaxNode syntax) 117public override BoundStatement InstrumentGotoStatement(BoundGotoStatement original, BoundStatement rewritten) 122public override BoundStatement InstrumentThrowStatement(BoundThrowStatement original, BoundStatement rewritten) 127public override BoundStatement InstrumentYieldBreakStatement(BoundYieldBreakStatement original, BoundStatement rewritten) 140public override BoundStatement InstrumentYieldReturnStatement(BoundYieldReturnStatement original, BoundStatement rewritten) 145public override void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation) 147base.InstrumentBlock(original, rewriter, ref additionalLocals, out var previousPrologue, out var previousEpilogue, out instrumentation); 196public override BoundStatement InstrumentDoStatementConditionalGotoStart(BoundDoStatement original, BoundStatement ifConditionGotoStart) 206public override BoundStatement InstrumentWhileStatementConditionalGotoStartOrBreak(BoundWhileStatement original, BoundStatement ifConditionGotoStart) 224public override BoundStatement InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, BoundStatement? collectionVarDecl) 231public override BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 245public override BoundStatement InstrumentForEachStatement(BoundForEachStatement original, BoundStatement rewritten) 254ImmutableArray.Create<BoundStatement>(foreachKeywordSequencePoint, 266public override BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 291public override BoundStatement InstrumentForStatementConditionalGotoStartOrBreak(BoundForStatement original, BoundStatement branchBack) 298public override BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack) 313public override BoundStatement InstrumentIfStatement(BoundIfStatement original, BoundStatement rewritten) 332public override BoundStatement InstrumentLabelStatement(BoundLabeledStatement original, BoundStatement rewritten) 341public override BoundStatement InstrumentUserDefinedLocalInitialization(BoundLocalDeclaration original, BoundStatement rewritten) 349public override BoundStatement InstrumentLockTargetCapture(BoundLockStatement original, BoundStatement lockTargetCapture) 357public override BoundStatement InstrumentReturnStatement(BoundReturnStatement original, BoundStatement rewritten) 370public override BoundStatement InstrumentSwitchStatement(BoundSwitchStatement original, BoundStatement rewritten) 384public override BoundStatement InstrumentSwitchWhenClauseConditionalGotoBody(BoundExpression original, BoundStatement ifConditionGotoBody) 395public override BoundStatement InstrumentUsingTargetCapture(BoundUsingStatement original, BoundStatement usingTargetCapture) 433public override BoundExpression InstrumentSwitchStatementExpression(BoundStatement original, BoundExpression rewrittenExpression, SyntheticBoundNodeFactory factory) 445public override BoundStatement InstrumentSwitchBindCasePatternVariables(BoundStatement bindings)
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.cs (10)
15private static BoundStatement AddSequencePoint(BoundStatement node) 20internal static BoundStatement AddSequencePoint(VariableDeclaratorSyntax declaratorSyntax, BoundStatement rewrittenStatement) 23var result = BoundSequencePoint.Create(declaratorSyntax, part, rewrittenStatement); 28internal static BoundStatement AddSequencePoint(PropertyDeclarationSyntax declarationSyntax, BoundStatement rewrittenStatement) 35var result = BoundSequencePoint.Create(declarationSyntax, part, rewrittenStatement); 40internal static BoundStatement AddSequencePoint(UsingStatementSyntax usingSyntax, BoundStatement rewrittenStatement)
Lowering\Instrumentation\Instrumenter.cs (59)
36private static BoundStatement InstrumentStatement(BoundStatement original, BoundStatement rewritten) 42public virtual BoundStatement InstrumentNoOpStatement(BoundNoOpStatement original, BoundStatement rewritten) 47public virtual BoundStatement InstrumentYieldBreakStatement(BoundYieldBreakStatement original, BoundStatement rewritten) 53public virtual BoundStatement InstrumentYieldReturnStatement(BoundYieldReturnStatement original, BoundStatement rewritten) 73public virtual void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation) 80public virtual BoundStatement InstrumentThrowStatement(BoundThrowStatement original, BoundStatement rewritten) 85public virtual BoundStatement InstrumentContinueStatement(BoundContinueStatement original, BoundStatement rewritten) 90public virtual BoundStatement InstrumentGotoStatement(BoundGotoStatement original, BoundStatement rewritten) 95public virtual BoundStatement InstrumentExpressionStatement(BoundExpressionStatement original, BoundStatement rewritten) 100public virtual BoundStatement InstrumentFieldOrPropertyInitializer(BoundStatement original, BoundStatement rewritten) 106public virtual BoundStatement InstrumentBreakStatement(BoundBreakStatement original, BoundStatement rewritten) 127public virtual BoundStatement InstrumentDoStatementConditionalGotoStart(BoundDoStatement original, BoundStatement ifConditionGotoStart) 134public virtual BoundStatement InstrumentWhileStatementConditionalGotoStartOrBreak(BoundWhileStatement original, BoundStatement ifConditionGotoStart) 142public virtual BoundStatement? InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, BoundStatement? collectionVarDecl) 149public virtual BoundStatement InstrumentForEachStatement(BoundForEachStatement original, BoundStatement rewritten) 155public virtual BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 162public virtual BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 169public virtual BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack) 176public virtual BoundStatement InstrumentForStatementConditionalGotoStartOrBreak(BoundForStatement original, BoundStatement branchBack) 191public virtual BoundStatement InstrumentIfStatement(BoundIfStatement original, BoundStatement rewritten) 205public virtual BoundStatement InstrumentLabelStatement(BoundLabeledStatement original, BoundStatement rewritten) 211public virtual BoundStatement InstrumentUserDefinedLocalInitialization(BoundLocalDeclaration original, BoundStatement rewritten) 241public virtual BoundStatement InstrumentLockTargetCapture(BoundLockStatement original, BoundStatement lockTargetCapture) 248public virtual BoundStatement InstrumentReturnStatement(BoundReturnStatement original, BoundStatement rewritten) 253public virtual BoundStatement InstrumentSwitchStatement(BoundSwitchStatement original, BoundStatement rewritten) 264public virtual BoundStatement InstrumentSwitchWhenClauseConditionalGotoBody(BoundExpression original, BoundStatement ifConditionGotoBody) 271public virtual BoundStatement InstrumentUsingTargetCapture(BoundUsingStatement original, BoundStatement usingTargetCapture) 290public virtual BoundExpression InstrumentSwitchStatementExpression(BoundStatement original, BoundExpression rewrittenExpression, SyntheticBoundNodeFactory factory) 308public virtual BoundStatement InstrumentSwitchBindCasePatternVariables(BoundStatement bindings)
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (9)
154BoundStatement methodBody, 279public override void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation) 281base.InstrumentBlock(original, rewriter, ref additionalLocals, out var previousPrologue, out epilogue, out instrumentation); 298var prologueBuilder = ArrayBuilder<BoundStatement>.GetInstance(_factory.CurrentFunction.ParameterCount); 339var instrumentationPrologue = (entryLogger != null) ? 343var instrumentationEpilogue = (returnLogger != null) ? 541ImmutableArray.Create<BoundStatement>(logCallStatement, rewrittenFilterPrologue) : 542ImmutableArray.Create<BoundStatement>(logCallStatement));
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (12)
82internal void GenerateMoveNextAndDispose(BoundStatement body, SynthesizedImplementationMethod moveNextMethod, SynthesizedImplementationMethod disposeMethod) 98var newBody = (BoundStatement)Visit(body); 187private BoundBlock HandleReturn(BoundStatement newBody) 258private BoundStatement EmitFinallyFrame(IteratorFinallyFrame frame, BoundLocal state) 260BoundStatement body = null; 289protected override BoundStatement GenerateReturn(bool finished) 388var rewrittenBody = (BoundStatement)this.Visit(node.TryBlock); 398var rewrittenHandler = (BoundStatement)this.Visit(node.FinallyBlockOpt); 421var bodyStatements = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.YieldsInTryAnalysis.cs (1)
28public YieldsInTryAnalysis(BoundStatement body)
Lowering\IteratorRewriter\IteratorRewriter.cs (7)
30BoundStatement body, 49internal static BoundStatement Rewrite( 50BoundStatement body, 280var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 301protected override void InitializeStateMachine(ArrayBuilder<BoundStatement> bodyBuilder, NamedTypeSymbol frameType, LocalSymbol stateMachineLocal) 312protected override BoundStatement GenerateStateMachineCreation(LocalSymbol stateMachineVariable, NamedTypeSymbol frameType, IReadOnlyDictionary<Symbol, CapturedSymbolReplacement> proxies) 314var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\LocalRewriter\LocalRewriter.cs (23)
44private readonly BoundStatement _rootStatement; 52BoundStatement rootStatement, 77public static BoundStatement Rewrite( 82BoundStatement statement, 125var loweredStatement = localRewriter.VisitStatement(statement); 135var spilledStatement = SpillSequenceSpiller.Rewrite(loweredStatement, method, compilationState, diagnostics); 162internal BoundStatement CurrentMethodBody 212private BoundStatement? VisitStatement(BoundStatement? node) 220return (BoundStatement?)node.Accept(this); 613ImmutableArray<BoundStatement> originalStatements = node.Statements; 614var statements = ArrayBuilder<BoundStatement?>.GetInstance(node.Statements.Length); 615foreach (var initializer in originalStatements) 623var statement = RewriteExpressionStatement((BoundExpressionStatement)block.Statements.Single(), suppressInstrumentation: true); 643var stmt = statements[i]; 655ImmutableArray<BoundStatement> rewrittenStatements; 660rewrittenStatements = ImmutableArray<BoundStatement>.Empty; 669BoundStatement? rewritten = statements[i]; 675BoundStatement original = originalStatements[i]; 738internal static bool IsFieldOrPropertyInitializer(BoundStatement initializer) 762initializer = (BoundStatement)block.Statements.First(); 784private static bool ShouldOptimizeOutInitializer(BoundStatement initializer) 786BoundStatement statement = initializer;
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (13)
32protected abstract ArrayBuilder<BoundStatement> BuilderForSection(SyntaxNode section); 38private ArrayBuilder<BoundStatement> _loweredDecisionDag; 341ArrayBuilder<BoundStatement> result, 370protected ImmutableArray<BoundStatement> LowerDecisionDagCore(BoundDecisionDag decisionDag) 372_loweredDecisionDag = ArrayBuilder<BoundStatement>.GetInstance(); 1063ArrayBuilder<BoundStatement> sectionBuilder = BuilderForSection(whenNode.Syntax); 1094ArrayBuilder<BoundStatement> sectionBuilder = BuilderForSection(whenClauseSyntax); 1113BoundStatement jumps = _factory.Switch(_factory.Local(_whenNodeIdentifierLocal), whenFalseSwitchSections.ToImmutableAndFree()); 1123void addConditionalGoto(BoundExpression whenExpression, SyntaxNode whenClauseSyntax, LabelSymbol whenTrueLabel, ArrayBuilder<BoundStatement> sectionBuilder) 1126BoundStatement conditionalGoto = _factory.ConditionalGoto(_localRewriter.VisitExpression(whenExpression), whenTrueLabel, jumpIfTrue: true); 1155ArrayBuilder<BoundStatement> sectionBuilder = BuilderForSection(whenClause.Syntax); 1167BoundStatement jump = _factory.Goto(GetDagNodeLabel(whenFalse)); 1177void lowerBindings(ImmutableArray<BoundPatternBinding> bindings, ArrayBuilder<BoundStatement> sectionBuilder)
Lowering\LocalRewriter\LocalRewriter_BasePatternSwitchLocalRewriter.cs (7)
25private readonly PooledDictionary<SyntaxNode, ArrayBuilder<BoundStatement>> _switchArms = PooledDictionary<SyntaxNode, ArrayBuilder<BoundStatement>>.GetInstance(); 27protected override ArrayBuilder<BoundStatement> BuilderForSection(SyntaxNode whenClauseSyntax) 32bool found = _switchArms.TryGetValue(sectionSyntax, out ArrayBuilder<BoundStatement>? result); 48var armBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 68protected (ImmutableArray<BoundStatement> loweredDag, ImmutableDictionary<SyntaxNode, ImmutableArray<BoundStatement>> switchSections) LowerDecisionDag(BoundDecisionDag decisionDag)
Lowering\LocalRewriter\LocalRewriter_Block.cs (14)
22var builder = ArrayBuilder<BoundStatement>.GetInstance(); 30Instrumenter.InstrumentBlock(node, this, ref additionalLocals, out var prologue, out var epilogue, out instrumentation); 51/// <returns>An <see cref="ImmutableArray{T}"/> of <see cref="BoundStatement"/></returns> 52public void VisitStatementSubList(ArrayBuilder<BoundStatement> builder, ImmutableArray<BoundStatement> statements, int startIndex = 0) 56BoundStatement? statement = VisitPossibleUsingDeclaration(statements[i], statements, i, out var replacedUsingDeclarations); 76/// <returns>A <see cref="BoundStatement"/></returns> 82public BoundStatement? VisitPossibleUsingDeclaration(BoundStatement node, ImmutableArray<BoundStatement> statements, int statementIndex, out bool replacedLocalDeclarations) 91ArrayBuilder<BoundStatement> builder = ArrayBuilder<BoundStatement>.GetInstance(); 105? new BoundBlock(node.Syntax, ImmutableArray<LocalSymbol>.Empty, ImmutableArray<BoundStatement>.Empty)
Lowering\LocalRewriter\LocalRewriter_BreakStatement.cs (1)
15BoundStatement result = new BoundGotoStatement(node.Syntax, node.Label, node.HasErrors);
Lowering\LocalRewriter\LocalRewriter_ContinueStatement.cs (1)
15BoundStatement result = new BoundGotoStatement(node.Syntax, node.Label, node.HasErrors);
Lowering\LocalRewriter\LocalRewriter_DoStatement.cs (3)
20var rewrittenBody = VisitStatement(node.Body); 33BoundStatement ifConditionGotoStart = new BoundConditionalGoto(syntax, rewrittenCondition, true, startLabel); 69ImmutableArray.Create<BoundStatement>(rewrittenBody,
Lowering\LocalRewriter\LocalRewriter_ExpressionStatement.cs (2)
21private BoundStatement? RewriteExpressionStatement(BoundExpressionStatement node, bool suppressInstrumentation = false) 31BoundStatement result = node.Update(loweredExpression);
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (15)
25var statementBuilder = ArrayBuilder<BoundStatement>.GetInstance(numFixedLocals + 1 + 1); //+1 for body, +1 for hidden seq point 26var cleanup = new BoundStatement[numFixedLocals]; 48BoundStatement? rewrittenBody = VisitStatement(node.Body); 194private BoundStatement InitializeFixedStatementLocal( 232private BoundStatement InitializeFixedStatementRegularLocal( 272BoundStatement pinnedTempInit = factory.Assignment(factory.Local(pinnedTemp), initializerExpr, isRef: true); 284BoundStatement localInit = InstrumentLocalDeclarationIfNecessary(localDecl, localSymbol, 299private BoundStatement InitializeFixedStatementGetPinnable( 388BoundStatement localInit = InstrumentLocalDeclarationIfNecessary(localDecl, localSymbol, factory.Assignment(factory.Local(localSymbol), pinAndGetPtr)); 401private BoundStatement InitializeFixedStatementStringLocal( 427BoundStatement stringTempInit = factory.Assignment(factory.Local(pinnedTemp), initializerExpr); 437BoundStatement localInit = InstrumentLocalDeclarationIfNecessary(localDecl, localSymbol, 454BoundStatement conditionalAdd = factory.If(notNullCheck, factory.Assignment(factory.Local(localSymbol), addition)); 470private BoundStatement InitializeFixedStatementArrayLocal( 537BoundStatement localInit = factory.ExpressionStatement(
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (61)
105private BoundStatement RewriteEnumeratorForEachStatement(BoundForEachStatement node) 115BoundStatement? rewrittenBody = VisitStatement(node.Body); 150BoundStatement enumeratorVarDecl = MakeLocalDeclaration(forEachSyntax, enumeratorVar, enumeratorVarInitValue); 169BoundStatement iterationVarDecl = LocalOrDeconstructionDeclaration(node, iterationVariables, iterationVarAssignValue); 191BoundStatement whileLoop = RewriteWhileStatement( 199BoundStatement result; 203BoundStatement tryFinally = WrapWithTryFinallyDispose(forEachSyntax, enumeratorInfo, enumeratorType, boundEnumeratorVar, whileLoop); 211statements: ImmutableArray.Create<BoundStatement>(enumeratorVarDecl, tryFinally)); 223statements: ImmutableArray.Create<BoundStatement>(enumeratorVarDecl, whileLoop)); 248private BoundStatement WrapWithTryFinallyDispose( 253BoundStatement rewrittenBody) 310BoundStatement disposeCallStatement; 324BoundStatement alwaysOrMaybeDisposeStmt; 378BoundStatement disposableVarDecl = MakeLocalDeclaration(forEachSyntax, disposableVar, disposableVarInitValue); 382BoundStatement disposeCallStatement = new BoundExpressionStatement(forEachSyntax, expression: disposeCall); 385BoundStatement ifStmt = RewriteIfStatement( 416BoundStatement tryFinally = new BoundTryStatement(forEachSyntax, 419statements: ImmutableArray.Create<BoundStatement>(rewrittenBody)), 429private BoundStatement WrapWithAwait(CommonForEachStatementSyntax forEachSyntax, BoundExpression disposeCall, BoundAwaitableInfo disposeAwaitableInfoOpt) 521private BoundStatement RewriteForEachStatementAsFor(BoundForEachStatement node, MethodSymbol indexerGet, MethodSymbol lengthGet) 533BoundStatement? rewrittenBody = VisitStatement(node.Body); 540BoundStatement arrayVarDecl = MakeLocalDeclaration(forEachSyntax, collectionTemp, rewrittenExpression); 554BoundStatement positionVarDecl = MakeLocalDeclaration(forEachSyntax, positionVar, 569BoundStatement iterationVariableDecl = LocalOrDeconstructionDeclaration(node, iterationVariables, iterationVarInitValue); 573BoundStatement initializer = new BoundStatementList(forEachSyntax, 574statements: ImmutableArray.Create<BoundStatement>(arrayVarDecl, positionVarDecl)); 595BoundStatement positionIncrement = MakePositionIncrement(forEachSyntax, boundPositionVar, intType); 602BoundStatement loopBody = CreateBlockDeclaringIterationVariables(iterationVariables, iterationVariableDecl, rewrittenBody, forEachSyntax); 608BoundStatement result = RewriteForStatementWithoutInnerLocals( 631private BoundStatement LocalOrDeconstructionDeclaration( 638BoundStatement iterationVarDecl; 663BoundStatement iteratorVariableInitialization, 664BoundStatement rewrittenBody, 698private BoundStatement RewriteSingleDimensionalArrayForEachStatement(BoundForEachStatement node) 712BoundStatement? rewrittenBody = VisitStatement(node.Body); 719BoundStatement arrayVarDecl = MakeLocalDeclaration(forEachSyntax, arrayVar, rewrittenExpression); 733BoundStatement positionVarDecl = MakeLocalDeclaration(forEachSyntax, positionVar, 748BoundStatement iterationVariableDecl = LocalOrDeconstructionDeclaration(node, iterationVariables, iterationVarInitValue); 752BoundStatement initializer = new BoundStatementList(forEachSyntax, 753statements: ImmutableArray.Create<BoundStatement>(arrayVarDecl, positionVarDecl)); 774BoundStatement positionIncrement = MakePositionIncrement(forEachSyntax, boundPositionVar, intType); 781BoundStatement loopBody = CreateBlockDeclaringIterationVariables(iterationVariables, iterationVariableDecl, rewrittenBody, forEachSyntax); 787BoundStatement result = RewriteForStatementWithoutInnerLocals( 823private BoundStatement RewriteMultiDimensionalArrayForEachStatement(BoundForEachStatement node) 843BoundStatement? rewrittenBody = VisitStatement(node.Body); 851BoundStatement arrayVarDecl = MakeLocalDeclaration(forEachSyntax, arrayVar, rewrittenExpression); 863BoundStatement[] upperVarDecl = new BoundStatement[rank]; 903BoundStatement iterationVarDecl = LocalOrDeconstructionDeclaration(node, iterationVariables, iterationVarInitValue); 912BoundStatement innermostLoopBody = CreateBlockDeclaringIterationVariables(iterationVariables, iterationVarDecl, rewrittenBody, forEachSyntax); 922BoundStatement? forLoop = null; 934BoundStatement positionVarDecl = MakeLocalDeclaration(forEachSyntax, positionVar[dimension], currentDimensionLowerBound); 953BoundStatement positionIncrement = MakePositionIncrement(forEachSyntax, boundPositionVar[dimension], intType); 955BoundStatement body; 984BoundStatement result = new BoundBlock( 1015private BoundStatement MakeLocalDeclaration(CSharpSyntaxNode syntax, LocalSymbol local, BoundExpression rewrittenInitialValue) 1017var result = RewriteLocalDeclaration( 1027private BoundStatement MakePositionIncrement(CSharpSyntaxNode syntax, BoundLocal boundPositionVar, TypeSymbol intType) 1050private void InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, [NotNullIfNotNull(nameof(collectionVarDecl))] ref BoundStatement? collectionVarDecl) 1058private void InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, ref BoundStatement iterationVarDecl) 1074private void InstrumentForEachStatement(BoundForEachStatement original, ref BoundStatement result)
Lowering\LocalRewriter\LocalRewriter_ForStatement.cs (18)
20var rewrittenInitializer = VisitStatement(node.Initializer); 22var rewrittenIncrement = VisitStatement(node.Increment); 23var rewrittenBody = VisitStatement(node.Body); 41private BoundStatement RewriteForStatementWithoutInnerLocals( 44BoundStatement? rewrittenInitializer, 46BoundStatement? rewrittenIncrement, 47BoundStatement rewrittenBody, 75var statementBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 105BoundStatement gotoEnd = new BoundGotoStatement(syntax, endLabel); 135BoundStatement? branchBack = null; 169private BoundStatement RewriteForStatement( 171BoundStatement? rewrittenInitializer, 173BoundStatement? rewrittenIncrement, 174BoundStatement rewrittenBody) 213var statementBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 224BoundStatement startLabelStatement = new BoundLabelStatement(syntax, startLabel); 233var blockBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 238BoundStatement ifNotConditionGotoBreak = new BoundConditionalGoto(rewrittenCondition.Syntax, rewrittenCondition, false, node.BreakLabel);
Lowering\LocalRewriter\LocalRewriter_GotoStatement.cs (1)
24BoundStatement result = node.Update(node.Label, caseExpressionOpt, labelExpressionOpt);
Lowering\LocalRewriter\LocalRewriter_IfStatement.cs (7)
20var rewrittenConsequence = VisitStatement(node.Consequence); 22var rewrittenAlternative = VisitStatement(node.AlternativeOpt); 32var result = RewriteIfStatement(syntax, rewrittenCondition, rewrittenConsequence, rewrittenAlternative, node.HasErrors); 43private static BoundStatement RewriteIfStatement( 46BoundStatement rewrittenConsequence, 47BoundStatement? rewrittenAlternativeOpt, 51var builder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (5)
93private readonly ArrayBuilder<BoundStatement> _statements = ArrayBuilder<BoundStatement>.GetInstance(); 101protected override ArrayBuilder<BoundStatement> BuilderForSection(SyntaxNode section) => _statements; 112var resultBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 117ImmutableArray<BoundStatement> loweredDag = LowerDecisionDagCore(decisionDag);
Lowering\LocalRewriter\LocalRewriter_LabeledStatement.cs (4)
18var rewrittenBody = VisitStatement(node.Body); 22private BoundStatement MakeLabeledStatement(BoundLabeledStatement node, BoundStatement? rewrittenBody) 24BoundStatement labelStatement = new BoundLabelStatement(node.Syntax, node.Label);
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.cs (4)
19private BoundStatement? RewriteLocalDeclaration(BoundLocalDeclaration? originalOpt, SyntaxNode syntax, LocalSymbol localSymbol, BoundExpression? rewrittenInitializer, bool hasErrors = false) 55BoundStatement rewrittenLocalDeclaration = new BoundExpressionStatement( 73private BoundStatement InstrumentLocalDeclarationIfNecessary(BoundLocalDeclaration? originalOpt, LocalSymbol localSymbol, BoundStatement rewrittenLocalDeclaration)
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (9)
24BoundStatement? rewrittenBody = VisitStatement(node.Body); 58BoundStatement boundLockTempInit = new BoundExpressionStatement(lockSyntax, assignmentToLockTemp); 75BoundStatement exitCall = new BoundExpressionStatement(lockSyntax, exitCallExpr); 105BoundStatement boundLockTakenTempInit = new BoundExpressionStatement(lockSyntax, assignmentToLockTakenTemp); 107BoundStatement enterCall = new BoundExpressionStatement( 131BoundBlock.SynthesizedNoLocals(lockSyntax, ImmutableArray.Create<BoundStatement>( 169BoundStatement enterCall = new BoundExpressionStatement( 187private BoundStatement InstrumentLockTargetCapture(BoundLockStatement original, BoundStatement lockTargetCapture)
Lowering\LocalRewriter\LocalRewriter_MultipleLocalDeclarations.cs (3)
26ArrayBuilder<BoundStatement>? inits = null; 36inits = ArrayBuilder<BoundStatement>.GetInstance(); 39inits.Add((BoundStatement)init);
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (9)
28public static BoundStatement Rewrite(LocalRewriter localRewriter, BoundSwitchStatement node) 31BoundStatement result = rewriter.LowerSwitchStatement(node); 71private BoundStatement LowerSwitchStatement(BoundSwitchStatement node) 74var result = ArrayBuilder<BoundStatement>.GetInstance(); 115(ImmutableArray<BoundStatement> loweredDag, ImmutableDictionary<SyntaxNode, ImmutableArray<BoundStatement>> switchSections) = 133var sectionBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 145ImmutableArray<BoundStatement> statements = sectionBuilder.ToImmutableAndFree(); 174BoundStatement translatedSwitch = _factory.Block(outerVariables.ToImmutableAndFree(), node.InnerLocalFunctions, result.ToImmutableAndFree());
Lowering\LocalRewriter\LocalRewriter_ReturnStatement.cs (2)
15BoundStatement rewritten = (BoundStatement)base.VisitReturnStatement(node)!;
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (4)
171var appendCallsStatements = resultExpressions.SelectAsArray(static (appendCall, @this) => (BoundStatement)@this._factory.ExpressionStatement(appendCall), this); 175var resultIf = _factory.If(appendShouldProceedLocal, _factory.StatementList(appendCallsStatements)); 406private readonly ImmutableArray<BoundStatement> _statements; 413public InterpolationHandlerResult(ImmutableArray<BoundStatement> statements, BoundLocal handlerTemp, LocalSymbol outTemp, LocalRewriter rewriter)
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (8)
49var result = ArrayBuilder<BoundStatement>.GetInstance(); 63(ImmutableArray<BoundStatement> loweredDag, ImmutableDictionary<SyntaxNode, ImmutableArray<BoundStatement>> switchSections) = 94var sectionBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 127var throwCall = 156private static BoundStatement ConstructThrowSwitchExpressionExceptionHelperCall(SyntheticBoundNodeFactory factory, BoundExpression unmatchedValue) 171private static BoundStatement ConstructThrowSwitchExpressionExceptionParameterlessHelperCall(SyntheticBoundNodeFactory factory) 185private static BoundStatement ConstructThrowInvalidOperationExceptionHelperCall(SyntheticBoundNodeFactory factory)
Lowering\LocalRewriter\LocalRewriter_ThrowStatement.cs (2)
11var result = (BoundStatement)base.VisitThrowStatement(node)!;
Lowering\LocalRewriter\LocalRewriter_TryStatement.cs (2)
47private static bool HasSideEffects([NotNullWhen(true)] BoundStatement? statement) 57foreach (var stmt in block.Statements)
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (17)
36BoundStatement? rewrittenBody = VisitStatement(node.Body); 61private BoundStatement MakeDeclarationUsingStatement(SyntaxNode syntax, 82ImmutableArray.Create<BoundStatement>(result)); 88private BoundStatement MakeLocalUsingDeclarationStatement(BoundUsingLocalDeclarations usingDeclarations, ImmutableArray<BoundStatement> statements) 93var usingStatement = MakeDeclarationUsingStatement(syntax, 183BoundStatement expressionStatement = new BoundExpressionStatement(expressionSyntax, tempAssignment); 189BoundStatement tryFinally = RewriteUsingStatementTryFinally(usingSyntax, usingSyntax, tryBlock, boundTemp, usingSyntax.AwaitKeyword, node.AwaitOpt, node.PatternDisposeInfoOpt); 195statements: ImmutableArray.Create<BoundStatement>(expressionStatement, tryFinally)); 222BoundStatement? rewrittenDeclaration = VisitStatement(localDeclaration); 253BoundStatement tryFinally = RewriteUsingStatementTryFinally(usingSyntax, declarationSyntax, tryBlock, boundTemp, awaitKeywordOpt, awaitOpt, patternDisposeInfo); 258statements: ImmutableArray.Create<BoundStatement>( 265BoundStatement tryFinally = RewriteUsingStatementTryFinally(usingSyntax, declarationSyntax, tryBlock, boundLocal, awaitKeywordOpt, awaitOpt, patternDisposeInfo); 278private BoundStatement RewriteUsingStatementTryFinally( 375BoundStatement disposeStatement = new BoundExpressionStatement(resourceSyntax, disposeCall); 394BoundStatement finallyStatement; 419BoundStatement tryFinally = new BoundTryStatement(
Lowering\LocalRewriter\LocalRewriter_WhileStatement.cs (9)
21var rewrittenBody = VisitStatement(node.Body); 41private BoundStatement RewriteWhileStatement( 44BoundStatement rewrittenBody, 67BoundStatement ifConditionGotoStart = new BoundConditionalGoto(rewrittenCondition.Syntax, rewrittenCondition, true, startLabel); 68BoundStatement gotoContinue = new BoundGotoStatement(syntax, continueLabel); 101private BoundStatement RewriteWhileStatement( 105BoundStatement rewrittenBody, 132BoundStatement continueLabelStatement = new BoundLabelStatement(syntax, continueLabel); 133BoundStatement ifNotConditionGotoBreak = new BoundConditionalGoto(rewrittenCondition.Syntax, rewrittenCondition, false, breakLabel);
Lowering\LocalRewriter\LocalRewriter_Yield.cs (4)
15var result = (BoundStatement)base.VisitYieldBreakStatement(node)!; 31var result = (BoundStatement)base.VisitYieldReturnStatement(node)!;
Lowering\MethodToClassRewriter.cs (12)
176var initializer = (BoundStatement?)this.Visit(node.Initializer); 179var increment = (BoundStatement?)this.Visit(node.Increment); 180var body = (BoundStatement)this.Visit(node.Body); 188BoundStatement body = (BoundStatement)this.Visit(node.Body); 196BoundStatement body = (BoundStatement)this.Visit(node.Body); 205var body = (BoundStatement)this.Visit(node.Body);
Lowering\SpillSequenceSpiller.cs (18)
43private ArrayBuilder<BoundStatement> _statements; 73public ImmutableArray<BoundStatement> GetStatements() 77return ImmutableArray<BoundStatement>.Empty; 141public void AddStatement(BoundStatement statement) 145_statements = ArrayBuilder<BoundStatement>.GetInstance(); 151public void AddStatements(ImmutableArray<BoundStatement> statements) 153foreach (var statement in statements) 233internal static BoundStatement Rewrite(BoundStatement body, MethodSymbol method, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics) 242return (BoundStatement)result; 283private BoundStatement UpdateStatement(BoundSpillSequenceBuilder builder, BoundStatement statement) 660Debug.Assert(!(node is BoundStatement)); 1233var whenNotNullStatement = UpdateStatement(whenNotNullBuilder, _F.ExpressionStatement(whenNotNull)); 1245var whenNotNullStatement = UpdateStatement(whenNotNullBuilder, _F.Assignment(_F.Local(tmp), whenNotNull)); 1277public static BoundStatement Replace(BoundNode node, BoundExpression receiver, int receiverID, int recursionDepth) 1280var result = (BoundStatement)replacer.Visit(node);
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
299protected override void VisitFinallyBlock(BoundStatement finallyBlock, ref LocalState unsetInFinally)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (15)
168protected abstract BoundStatement GenerateReturn(bool finished); 241protected BoundStatement Dispatch(bool isOutermost) 247var result = F.Switch(F.Local(cachedState), sections.ToImmutableArray()); 257var missingStateDispatch = GenerateMissingStateDispatch(); 267protected virtual BoundStatement? GenerateMissingStateDispatch() 292private BoundStatement PossibleIteratorScope(ImmutableArray<LocalSymbol> locals, Func<BoundStatement> wrapped) 337var translatedStatement = wrapped(); 378F.Block(variableCleanup.SelectAsArray((e, f) => (BoundStatement)f.ExpressionStatement(e), F))); 397internal BoundBlock MakeStateMachineScope(ImmutableArray<StateMachineFieldSymbol> hoistedLocals, BoundStatement statement) 405internal static bool TryUnwrapBoundStateMachineScope(ref BoundStatement statement, out ImmutableArray<StateMachineFieldSymbol> hoistedLocals) 740BoundStatement translated; 845BoundBlock tryBlock = F.Block((BoundStatement)this.Visit(node.TryBlock)); 872BoundStatement result = node.Update(tryBlock, catchBlocks, finallyBlockOpt, node.FinallyLabelOpt, node.PreferFaultHandler); 904protected BoundStatement CacheThisIfNeeded()
Lowering\StateMachineRewriter\ResumableStateMachineStateAllocator.cs (1)
76public BoundStatement? GenerateThrowMissingStateDispatch(SyntheticBoundNodeFactory f, BoundExpression cachedState, string message)
Lowering\StateMachineRewriter\StateMachineRewriter.cs (15)
20protected readonly BoundStatement body; 38BoundStatement body, 81protected abstract void InitializeStateMachine(ArrayBuilder<BoundStatement> bodyBuilder, NamedTypeSymbol frameType, LocalSymbol stateMachineLocal); 86protected abstract BoundStatement GenerateStateMachineCreation(LocalSymbol stateMachineVariable, NamedTypeSymbol frameType, IReadOnlyDictionary<Symbol, CapturedSymbolReplacement> proxies); 93protected BoundStatement Rewrite() 282private BoundStatement GenerateKickoffMethodBody() 285var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 301protected BoundStatement GenerateParameterStorage(LocalSymbol stateMachineVariable, IReadOnlyDictionary<Symbol, CapturedSymbolReplacement> proxies) 303var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 411var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 415BoundStatement makeIterator = F.Assignment(F.Local(resultVariable), F.New(stateMachineType.Constructor, F.Literal(initialState))); 423var thenBuilder = ArrayBuilder<BoundStatement>.GetInstance(4); 476BoundStatement copy = InitializeParameterField(getEnumeratorMethod, parameter, resultParameter, parameterProxy); 490protected virtual void GenerateResetInstance(ArrayBuilder<BoundStatement> builder, StateMachineState initialState) 497protected virtual BoundStatement InitializeParameterField(MethodSymbol getEnumeratorMethod, ParameterSymbol parameter, BoundExpression resultParameter, BoundExpression parameterProxy)
Lowering\SyntheticBoundNodeFactory.cs (37)
458return Block(ImmutableArray<BoundStatement>.Empty); 461public BoundBlock Block(ImmutableArray<BoundStatement> statements) 466public BoundBlock Block(params BoundStatement[] statements) 471public BoundBlock Block(ImmutableArray<LocalSymbol> locals, params BoundStatement[] statements) 476public BoundBlock Block(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> statements) 481public BoundBlock Block(ImmutableArray<LocalSymbol> locals, ImmutableArray<LocalFunctionSymbol> localFunctions, params BoundStatement[] statements) 486public BoundBlock Block(ImmutableArray<LocalSymbol> locals, ImmutableArray<LocalFunctionSymbol> localFunctions, ImmutableArray<BoundStatement> statements) 498return StatementList(ImmutableArray<BoundStatement>.Empty); 501public BoundStatementList StatementList(ImmutableArray<BoundStatement> statements) 506public BoundStatementList StatementList(BoundStatement first, BoundStatement second) 537public void CloseMethod(BoundStatement body) 851public BoundStatement If(BoundExpression condition, BoundStatement thenClause, BoundStatement? elseClauseOpt = null) 856public BoundStatement ConditionalGoto(BoundExpression condition, LabelSymbol label, bool jumpIfTrue) 861public BoundStatement If(BoundExpression condition, ImmutableArray<LocalSymbol> locals, BoundStatement thenClause, BoundStatement? elseClauseOpt = null) 876var statements = ArrayBuilder<BoundStatement>.GetInstance(); 970public BoundSpillSequence SpillSequence(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression result) 982public readonly ImmutableArray<BoundStatement> Statements; 984public SyntheticSwitchSection(ImmutableArray<int> values, ImmutableArray<BoundStatement> statements) 991public SyntheticSwitchSection SwitchSection(int value, params BoundStatement[] statements) 994public SyntheticSwitchSection SwitchSection(ImmutableArray<int> values, params BoundStatement[] statements) 1000public BoundStatement Switch(BoundExpression ex, ImmutableArray<SyntheticSwitchSection> sections) 1014var statements = ArrayBuilder<BoundStatement>.GetInstance(); 1120public BoundStatement BaseInitialization() 1129public BoundStatement SequencePoint(SyntaxNode syntax, BoundStatement statement) 1134public BoundStatement SequencePointWithSpan(CSharpSyntaxNode syntax, TextSpan span, BoundStatement statement) 1139public BoundStatement HiddenSequencePoint(BoundStatement? statementOpt = null) 1144public BoundStatement ThrowNull() 1451internal BoundStatement Try( 1581internal BoundStatement NoOp(NoOpStatementFlavor noOpStatementFlavor)
Operations\CSharpOperationFactory.cs (4)
1675ImmutableArray<IOperation> operations = CreateFromArray<BoundStatement, IOperation>(boundBlock.Statements); 1767ImmutableArray<IOperation> before = CreateFromArray<BoundStatement, IOperation>(ToStatements(boundForStatement.Initializer)); 1769ImmutableArray<IOperation> atLoopBottom = CreateFromArray<BoundStatement, IOperation>(ToStatements(boundForStatement.Increment)); 2553ImmutableArray<IOperation> body = CreateFromArray<BoundStatement, IOperation>(boundSwitchSection.Statements);
Operations\CSharpOperationFactory_Methods.cs (3)
18internal ImmutableArray<BoundStatement> ToStatements(BoundStatement? statement) 22return ImmutableArray<BoundStatement>.Empty;
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
40internal override void GenerateMethodBodyStatements(SyntheticBoundNodeFactory F, ArrayBuilder<BoundStatement> statements, BindingDiagnosticBag diagnostics)
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
70var statementsBuilder = ArrayBuilder<BoundStatement>.GetInstance(_positionalMembers.Length + 1);
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (1)
74F.CloseMethod(F.Block(ImmutableArray.Create<BoundStatement>(F.Return(expression))));
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (4)
131ArrayBuilder<BoundStatement> block; 141block = ArrayBuilder<BoundStatement>.GetInstance(); 174block = ArrayBuilder<BoundStatement>.GetInstance(); 236static BoundStatement makeAppendString(SyntheticBoundNodeFactory F, BoundParameter builder, string value)
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (3)
64var block = ArrayBuilder<BoundStatement>.GetInstance(); 91static BoundStatement makeAppendString(SyntheticBoundNodeFactory F, BoundLocal builder, string value) 96static BoundStatement makeAppendChar(SyntheticBoundNodeFactory F, BoundLocal builder, char value)
Symbols\Synthesized\SynthesizedEmbeddedNativeIntegerAttributeSymbol.cs (2)
72private void GenerateParameterlessConstructorBody(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements) 89private void GenerateBoolArrayConstructorBody(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, ImmutableArray<ParameterSymbol> parameters)
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (5)
76private void GenerateByteArrayConstructorBody(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, ImmutableArray<ParameterSymbol> parameters) 90private void GenerateSingleByteConstructorBody(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, ImmutableArray<ParameterSymbol> parameters) 114private readonly Action<SyntheticBoundNodeFactory, ArrayBuilder<BoundStatement>, ImmutableArray<ParameterSymbol>> _getConstructorBody; 119Action<SyntheticBoundNodeFactory, ArrayBuilder<BoundStatement>, ImmutableArray<ParameterSymbol>> getConstructorBody) : 133internal override void GenerateMethodBodyStatements(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, BindingDiagnosticBag diagnostics) => _getConstructorBody(factory, statements, _parameters);
Symbols\Synthesized\SynthesizedEmbeddedNullableContextAttributeSymbol.cs (1)
60private void GenerateConstructorBody(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, ImmutableArray<ParameterSymbol> parameters)
Symbols\Synthesized\SynthesizedEmbeddedNullablePublicOnlyAttributeSymbol.cs (1)
57private void GenerateConstructorBody(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, ImmutableArray<ParameterSymbol> parameters)
Symbols\Synthesized\SynthesizedEmbeddedRefSafetyRulesAttributeSymbol.cs (1)
52private void GenerateConstructorBody(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, ImmutableArray<ParameterSymbol> parameters)
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (5)
390statements: ImmutableArray.Create<BoundStatement>( 413statements: ImmutableArray.Create<BoundStatement>( 484statements: ImmutableArray<BoundStatement>.Empty, 490ImmutableArray.Create<BoundStatement>( 606ImmutableArray.Create<BoundStatement>(submissionAssignment, returnStatement))
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (2)
305var statements = ArrayBuilder<BoundStatement>.GetInstance(); 315internal virtual void GenerateMethodBodyStatements(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, BindingDiagnosticBag diagnostics)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (16)
CompilationContext.cs (3)
677private static BoundStatement? BindExpression(Binder binder, ExpressionSyntax syntax, DiagnosticBag diagnostics, out ResultProperties resultProperties) 756private static BoundStatement BindStatement(Binder binder, StatementSyntax syntax, DiagnosticBag diagnostics, out ResultProperties properties) 768private static BoundStatement? BindAssignment(Binder binder, ExpressionSyntax syntax, DiagnosticBag diagnostics)
Rewriters\LocalDeclarationRewriter.cs (5)
18internal static BoundStatement Rewrite( 21BoundStatement node, 25var builder = ArrayBuilder<BoundStatement>.GetInstance(); 64ArrayBuilder<BoundStatement> statements, 91ArrayBuilder<BoundStatement> statements,
Symbols\EEConstructorSymbol.cs (1)
32ImmutableArray.Create<BoundStatement>(
Symbols\EEMethodSymbol.cs (7)
23internal delegate BoundStatement GenerateMethodBody( 473var body = _generateMethodBody(this, diagnostics.DiagnosticBag, out declaredLocalsArray, out _lazyResultProperties); 507body = (BoundStatement)LocalDeclarationRewriter.Rewrite( 527body = (BoundStatement)PlaceholderLocalRewriter.Rewrite(compilation, declaredLocals, body, diagnostics.DiagnosticBag); 540var statementsBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 631body = (BoundStatement)CapturedVariableRewriter.Rewrite( 729private static TypeSymbol CalculateReturnType(CSharpCompilation compilation, BoundStatement bodyOpt)