3 instantiations of BoundArrayInitialization
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Invocation.cs (1)
1730
new
BoundArrayInitialization
(node, isInferred: false, collectionArgs) { WasCompilerGenerated = true },
Generated\BoundNodes.xml.Generated.cs (1)
7173
var result = new
BoundArrayInitialization
(this.Syntax, isInferred, initializers, this.HasErrors);
Lowering\SyntheticBoundNodeFactory.cs (1)
1551
new
BoundArrayInitialization
(Syntax, isInferred: false, elements) { WasCompilerGenerated = true },
71 references to BoundArrayInitialization
Microsoft.CodeAnalysis.CSharp (71)
Binder\Binder_Expressions.cs (5)
4206
private
BoundArrayInitialization
ConvertAndBindArrayInitialization(
4286
private
BoundArrayInitialization
BindArrayInitializerList(
4309
private
BoundArrayInitialization
BindUnexpectedArrayInitializer(
4315
var
result = BindArrayInitializerList(
4400
BoundArrayInitialization
initializer = BindArrayInitializerList(diagnostics, initSyntax, type, knownSizes, 1, isInferred, boundInitExprOpt);
Binder\Binder_Statements.cs (1)
885
var
result = BindUnexpectedArrayInitializer((InitializerExpressionSyntax)initializer,
BoundTree\BoundArrayInitialization.cs (1)
11
public
BoundArrayInitialization
Update(ImmutableArray<BoundExpression> initializers)
BoundTree\BoundNode.cs (1)
362
this is BoundArrayCreation { Bounds: [BoundLiteral { WasCompilerGenerated: true }], InitializerOpt:
BoundArrayInitialization
{ WasCompilerGenerated: true }, WasCompilerGenerated: true } or
BoundTree\Expression.cs (1)
131
internal static ImmutableArray<BoundExpression> GetChildInitializers(
BoundArrayInitialization
? arrayInitializer)
CodeGen\EmitArrayInitializer.cs (7)
45
private void EmitArrayInitializers(ArrayTypeSymbol arrayType,
BoundArrayInitialization
inits)
146
indices.Push(new IndexDesc(i, ((
BoundArrayInitialization
)inits[i]).Initializers));
180
indices.Push(new IndexDesc(i, ((
BoundArrayInitialization
)inits[i]).Initializers));
306
var
asArrayInit = init as
BoundArrayInitialization
;
352
SerializeArrayRecursive(bw, ((
BoundArrayInitialization
)init).Initializers);
691
var
initializer = arrayCreation.InitializerOpt;
CodeGen\EmitExpression.cs (1)
2399
var
initializer = expression.InitializerOpt;
CodeGen\EmitStackAllocInitializer.cs (2)
16
private void EmitStackAlloc(TypeSymbol type,
BoundArrayInitialization
? inits, BoundExpression count)
172
Debug.Assert(!(init is
BoundArrayInitialization
), "Nested initializers are not allowed for stackalloc");
CodeGen\Optimizer.cs (1)
1754
public override BoundNode VisitArrayInitialization(
BoundArrayInitialization
node)
FlowAnalysis\AbstractFlowPass.cs (1)
1602
public override BoundNode VisitArrayInitialization(
BoundArrayInitialization
node)
FlowAnalysis\NullableWalker.cs (6)
4552
var
initialization = node.InitializerOpt;
4564
private TypeSymbol VisitArrayInitialization(TypeSymbol type,
BoundArrayInitialization
initialization, bool hasErrors)
4763
private static void GetArrayElements(
BoundArrayInitialization
node, ArrayBuilder<BoundExpression> builder)
4769
GetArrayElements((
BoundArrayInitialization
)child, builder);
11759
public override BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node)
11936
var
initialization = node.InitializerOpt;
Generated\BoundNodes.xml.Generated.cs (31)
7120
public BoundArrayCreation(SyntaxNode syntax, ImmutableArray<BoundExpression> bounds,
BoundArrayInitialization
? initializerOpt, TypeSymbol type, bool hasErrors = false)
7133
public
BoundArrayInitialization
? InitializerOpt { get; }
7138
public BoundArrayCreation Update(ImmutableArray<BoundExpression> bounds,
BoundArrayInitialization
? initializerOpt, TypeSymbol type)
7169
public
BoundArrayInitialization
Update(bool isInferred, ImmutableArray<BoundExpression> initializers)
7173
var
result = new BoundArrayInitialization(this.Syntax, isInferred, initializers, this.HasErrors);
7183
protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol? type, bool hasErrors = false)
7197
public
BoundArrayInitialization
? InitializerOpt { get; }
7202
public BoundStackAllocArrayCreation(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol? type, bool hasErrors = false)
7215
public BoundStackAllocArrayCreation Update(TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol? type)
7229
public BoundConvertedStackAllocExpression(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol type, bool hasErrors = false)
7244
public BoundConvertedStackAllocExpression Update(TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol type)
9208
return VisitArrayInitialization((
BoundArrayInitialization
)node, arg);
9492
public virtual R VisitArrayInitialization(
BoundArrayInitialization
node, A arg) => this.DefaultVisit(node, arg);
9728
public virtual BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node) => this.DefaultVisit(node);
10579
public override BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node)
11903
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
11907
public override BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node)
11916
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
11924
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
14343
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
14358
public override BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node)
14361
BoundArrayInitialization
updatedNode;
14379
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
14398
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
16673
public override TreeDumperNode VisitArrayInitialization(
BoundArrayInitialization
node, object? arg) => new TreeDumperNode("arrayInitialization", null, new TreeDumperNode[]
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
1261
if (paramsArray is BoundArrayCreation { Bounds: [BoundLiteral] bounds, InitializerOpt:
BoundArrayInitialization
{ Initializers: var elements } initialization } creation)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
696
var
initialization = new BoundArrayInitialization(
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (1)
39
var
initializerOpt = stackAllocNode.InitializerOpt;
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
188
var
initializer = args.InitializerOpt;
Lowering\SpillSequenceSpiller.cs (7)
319
var
arrayInitialization = (
BoundArrayInitialization
)expression;
808
var
init = (
BoundArrayInitialization
)VisitExpression(ref builder, node.InitializerOpt);
826
public override BoundNode VisitArrayInitialization(
BoundArrayInitialization
node)
837
var
initializerOpt = (
BoundArrayInitialization
)VisitExpression(ref builder, node.InitializerOpt);
Operations\CSharpOperationFactory.cs (2)
102
return CreateBoundArrayInitializationOperation((
BoundArrayInitialization
)boundNode);
1215
private IArrayInitializerOperation CreateBoundArrayInitializationOperation(
BoundArrayInitialization
boundArrayInitialization)