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)
7172
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);
11762
public override BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node)
11939
var
initialization = node.InitializerOpt;
Generated\BoundNodes.xml.Generated.cs (31)
7119
public BoundArrayCreation(SyntaxNode syntax, ImmutableArray<BoundExpression> bounds,
BoundArrayInitialization
? initializerOpt, TypeSymbol type, bool hasErrors = false)
7132
public
BoundArrayInitialization
? InitializerOpt { get; }
7137
public BoundArrayCreation Update(ImmutableArray<BoundExpression> bounds,
BoundArrayInitialization
? initializerOpt, TypeSymbol type)
7168
public
BoundArrayInitialization
Update(bool isInferred, ImmutableArray<BoundExpression> initializers)
7172
var
result = new BoundArrayInitialization(this.Syntax, isInferred, initializers, this.HasErrors);
7182
protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol? type, bool hasErrors = false)
7196
public
BoundArrayInitialization
? InitializerOpt { get; }
7201
public BoundStackAllocArrayCreation(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol? type, bool hasErrors = false)
7214
public BoundStackAllocArrayCreation Update(TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol? type)
7228
public BoundConvertedStackAllocExpression(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol type, bool hasErrors = false)
7243
public BoundConvertedStackAllocExpression Update(TypeSymbol elementType, BoundExpression count,
BoundArrayInitialization
? initializerOpt, TypeSymbol type)
9207
return VisitArrayInitialization((
BoundArrayInitialization
)node, arg);
9491
public virtual R VisitArrayInitialization(
BoundArrayInitialization
node, A arg) => this.DefaultVisit(node, arg);
9727
public virtual BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node) => this.DefaultVisit(node);
10578
public override BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node)
11902
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
11906
public override BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node)
11915
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
11923
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
14342
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
14357
public override BoundNode? VisitArrayInitialization(
BoundArrayInitialization
node)
14360
BoundArrayInitialization
updatedNode;
14378
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
14397
BoundArrayInitialization
? initializerOpt = (
BoundArrayInitialization
?)this.Visit(node.InitializerOpt);
16672
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)