2 writes to Statements
Microsoft.CodeAnalysis.CSharp (2)
Generated\BoundNodes.xml.Generated.cs (2)
4816this.Statements = statements; 4825this.Statements = statements;
80 references to Statements
Microsoft.CodeAnalysis.CSharp (80)
Binder\Binder_Query.cs (1)
682var r1 = l1 != null ? l1.Body.Statements[0] as BoundReturnStatement : null;
Binder\Binder_Statements.cs (2)
153(block = (BoundBlock)result).Statements.Length == 1 && 154block.Statements.Single().WasCompilerGenerated == false), "Synthetic node would not get cached");
Binder\ForLoopBinder.cs (2)
108Debug.Assert(increment.Kind != BoundKind.StatementList || ((BoundStatementList)increment).Statements.Length > 1); 115increment = new BoundBlock(scopeDesignator, locals, ((BoundStatementList)increment).Statements)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (3)
3286switch (lambda.Body.Statements.Length) 3292if (lambda.Body.Statements[0].Kind == BoundKind.ReturnStatement) 3294var returnStmt = (BoundReturnStatement)lambda.Body.Statements[0];
Binder\SwitchBinder_Patterns.cs (1)
131sectionBuilder.Add(oldSection.Update(oldSection.Locals, labelBuilder.ToImmutableAndFree(), oldSection.Statements));
BoundTree\BoundNode_Source.cs (3)
86var statements = block.Statements; 297foreach (var statement in section.Statements) 328foreach (var statement in list.Statements)
BoundTree\Expression.cs (1)
170(this.Kind == BoundKind.StatementList || this.Kind == BoundKind.Scope) ? StaticCast<BoundNode?>.From(this.Statements) : ImmutableArray<BoundNode?>.Empty;
BoundTree\UnboundLambda.cs (1)
1568var statements = body.Statements;
CodeGen\EmitStatement.cs (6)
127for (int i = 0, n = list.Statements.Length; i < n; i++) 129EmitStatement(list.Statements[i]); 658if (list != null && list.Statements.LastOrDefault() == block) 757EmitStatements(block.Statements); 809EmitStatements(block.Statements); 1193EmitStatements(catchBlock.ExceptionFilterPrologueOpt.Statements);
Compiler\MethodCompiler.cs (4)
971body = BoundBlock.SynthesizedNoLocals(initializerStatements.Syntax, initializerStatements.Statements); 1004new BoundBlock(analyzedInitializers.Syntax, ImmutableArray<LocalSymbol>.Empty, analyzedInitializers.Statements), // The block is necessary to establish the right local scope for the analysis 1058body = body.Update(body.Locals, body.LocalFunctions, body.HasUnsafeModifier, body.Instrumentation, body.Statements.Insert(insertAt, analyzedInitializers)); 1295boundStatements = boundStatements.Concat(lowered.Statements);
FlowAnalysis\AbstractFlowPass.cs (3)
1307VisitStatements(node.Statements); 1321VisitStatements(node.Statements); 3203foreach (var statement in node.Statements)
FlowAnalysis\DefiniteAssignment.cs (3)
2179foreach (var stmt in block.Statements) 2191foreach (var stmt in block.Statements) 2201foreach (var stmt in block.Statements)
FlowAnalysis\FlowAnalysisPass.cs (4)
85var newStatements = block.Statements.Add(new BoundReturnStatement(trailingExpression.Syntax, RefKind.None, trailingExpression, @checked: false)); 162return body.Update(body.Locals, body.LocalFunctions, body.HasUnsafeModifier, body.Instrumentation, body.Statements.Insert(index: 0, initializations)); 169var statements = body.Statements; 204return body.Update(body.Locals, body.LocalFunctions, body.HasUnsafeModifier, body.Instrumentation, body.Statements.Add(ret));
FlowAnalysis\NullableWalker.cs (2)
3132foreach (var stmt in block.Statements) 3203foreach (var stmt in block.Statements)
Generated\BoundNodes.xml.Generated.cs (23)
3329if (locals != this.Locals || localFunctions != this.LocalFunctions || hasUnsafeModifier != this.HasUnsafeModifier || instrumentation != this.Instrumentation || statements != this.Statements) 3358if (locals != this.Locals || statements != this.Statements) 4835if (statements != this.Statements) 5679if (locals != this.Locals || switchLabels != this.SwitchLabels || statements != this.Statements) 7732if (statements != this.Statements) 10113this.VisitList(node.Statements); 10118this.VisitList(node.Statements); 10293this.VisitList(node.Statements); 10428this.VisitList(node.Statements); 10685this.VisitList(node.Statements); 11323ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 11328ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 11548ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 11693ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 12043ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 13393ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 13400ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 13764ImmutableArray<BoundStatement> statements = this.VisitList(node.Statements); 15749new TreeDumperNode("statements", null, from x in node.Statements select Visit(x, null)), 15756new TreeDumperNode("statements", null, from x in node.Statements select Visit(x, null)), 16091new TreeDumperNode("statements", null, from x in node.Statements select Visit(x, null)), 16291new TreeDumperNode("statements", null, from x in node.Statements select Visit(x, null)), 16873new TreeDumperNode("statements", null, from x in node.Statements select Visit(x, null)),
Lowering\ClosureConversion\ClosureConversion.cs (4)
1177foreach (var statement in node.Statements) 1204var statements = VisitList(node.Statements); 1264prologueBuilder.AddRange(rewrittenFilterPrologue.Statements); 1315foreach (var s in node.Statements)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
134foreach (var s in block.Statements)
Lowering\Instrumentation\DebugInfoInjector.cs (1)
126return block.Update(block.Locals, block.LocalFunctions, block.HasUnsafeModifier, block.Instrumentation, ImmutableArray.Create(InstrumentFieldOrPropertyInitializer(block.Statements.Single(), syntax)));
Lowering\LocalRewriter\LocalRewriter.cs (5)
713var statement = RewriteExpressionStatement((BoundExpressionStatement)block.Statements.Single(), suppressInstrumentation: true); 747ImmutableArray<BoundStatement> originalStatements = node.Statements; 748var statements = ArrayBuilder<BoundStatement?>.GetInstance(node.Statements.Length); 883if (block.Statements.Length == 1) 885initializer = (BoundStatement)block.Statements.First();
Lowering\LocalRewriter\LocalRewriter_Block.cs (1)
33VisitStatementSubList(builder, node.Statements);
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (1)
141sectionBuilder.AddRange(_localRewriter.VisitList(section.Statements));
Lowering\LocalRewriter\LocalRewriter_TryStatement.cs (1)
57foreach (var stmt in block.Statements)
Lowering\MethodToClassRewriter.cs (1)
157var newStatements = VisitList(node.Statements);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
416var rewrittenStatements = rewrittenBlock.Statements; 771var statements = VisitList(node.Statements);
Operations\CSharpOperationFactory.cs (3)
1071((boundOperand as BoundLambda)?.Body.Statements.SingleOrDefault() as BoundReturnStatement)?. 1753ImmutableArray<IOperation> operations = CreateFromArray<BoundStatement, IOperation>(boundBlock.Statements); 2698ImmutableArray<IOperation> body = CreateFromArray<BoundStatement, IOperation>(boundSwitchSection.Statements);
Operations\CSharpOperationFactory_Methods.cs (1)
27return ((BoundStatementList)statement).Statements;