29 instantiations of BoundObjectCreationExpression
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Invocation.cs (2)
1454defaultValue = new BoundObjectCreationExpression(syntax, methodSymbol, unknownArgument) { WasCompilerGenerated = true }; 1463defaultValue = new BoundObjectCreationExpression(syntax, methodSymbol, dispatchArgument) { WasCompilerGenerated = true };
Generated\BoundNodes.xml.Generated.cs (1)
6385var result = new BoundObjectCreationExpression(this.Syntax, constructor, constructorsGroup, arguments, argumentNamesOpt, argumentRefKindsOpt, expanded, argsToParamsOpt, defaultArguments, constantValueOpt, initializerExpressionOpt, wasTargetTyped, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
686new BoundObjectCreationExpression(syntax: syntax, constructor: constructor),
Lowering\LocalRewriter\LocalRewriter_AnonymousObjectCreation.cs (1)
23return new BoundObjectCreationExpression(
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
1371return new BoundObjectCreationExpression( 1667return new BoundObjectCreationExpression(
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
328return new BoundObjectCreationExpression(syntax, spanConstructor, array); 448arrayOrList = new BoundObjectCreationExpression(syntax, synthesizedType.Constructors.Single(), fieldValue) { WasCompilerGenerated = true };
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (5)
115result = new BoundObjectCreationExpression(node.Syntax, ctor.AsMember((NamedTypeSymbol)node.Type), utf8Bytes, _factory.Literal(0), _factory.Literal(length)); 1063return new BoundObjectCreationExpression(syntax, ctor, rewrittenConversion); 1174BoundExpression consequence = new BoundObjectCreationExpression( 1258return new BoundObjectCreationExpression( 1383return new BoundObjectCreationExpression(call.Syntax, ctor, call);
Lowering\LocalRewriter\LocalRewriter_Index.cs (3)
31return new BoundObjectCreationExpression(node.Syntax, node.MethodOpt, operand, fromEnd); 43BoundExpression indexCreation = new BoundObjectCreationExpression(node.Syntax, node.MethodOpt, boundOperandGetValueOrDefault, fromEnd); 79return new BoundObjectCreationExpression(syntax, nullableCtor, underlyingValue);
Lowering\LocalRewriter\LocalRewriter_Range.cs (1)
101BoundExpression consequence = new BoundObjectCreationExpression(node.Syntax, nullableCtor, rangeExpr);
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (2)
67BoundObjectCreationExpression currentCreation = new BoundObjectCreationExpression(syntax, smallestConstructor, smallestCtorArguments); 94currentCreation = new BoundObjectCreationExpression(syntax, constructor, ctorArguments);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (4)
369BoundExpression consequence = new BoundObjectCreationExpression( 823BoundExpression consequence = new BoundObjectCreationExpression(syntax, ctor, userDefinedCall); 890boundOne = new BoundObjectCreationExpression(node.Syntax, ctor, boundOne); 981BoundExpression consequence = new BoundObjectCreationExpression(syntax, ctor, methodCall);
Lowering\SyntheticBoundNodeFactory.cs (3)
778=> new BoundObjectCreationExpression(Syntax, ctor, args) { WasCompilerGenerated = true }; 781=> new BoundObjectCreationExpression( 798return new BoundObjectCreationExpression(Syntax, ctor, args) { WasCompilerGenerated = true };
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
510new BoundObjectCreationExpression( 587new BoundObjectCreationExpression(
94 references to BoundObjectCreationExpression
Microsoft.CodeAnalysis.CSharp (94)
Binder\Binder.ValueChecks.cs (4)
4365var objectCreation = (BoundObjectCreationExpression)expr; 5121var objectCreation = (BoundObjectCreationExpression)expr;
Binder\Binder_Conversions.cs (1)
896(collectionCreation is BoundObjectCreationExpression creation && creation.Expanded == isExpanded && creation.Constructor == constructor));
Binder\Binder_Expressions.cs (5)
6761private BoundObjectCreationExpression BindClassCreationExpressionContinued( 6825var creation = new BoundObjectCreationExpression( 7018var creation = (BoundObjectCreationExpression)classCreation; 9625else if (convertedIndex is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true }, InitializerExpressionOpt: null } &&
Binder\Binder_InterpolatedString.cs (3)
733if (outConstructorCall is not BoundObjectCreationExpression { ResultKind: LookupResultKind.Viable }) 746if (nonOutConstructorCall is BoundObjectCreationExpression { ResultKind: LookupResultKind.Viable }) 799Debug.Assert(constructorCall.HasErrors || constructorCall is BoundObjectCreationExpression or BoundDynamicObjectCreationExpression);
Binder\RefSafetyAnalysis.cs (1)
789public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node)
BoundTree\BoundExpression.cs (1)
536internal BoundObjectCreationExpression Update(
BoundTree\BoundObjectCreationExpression.cs (2)
18public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, 24public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<MethodSymbol> constructorsGroup, ImmutableArray<BoundExpression> arguments,
BoundTree\BoundTreeVisitors.cs (1)
118return VisitObjectCreationExpression(node as BoundObjectCreationExpression, arg);
BoundTree\Expression.cs (1)
149protected override ImmutableArray<BoundNode?> Children => StaticCast<BoundNode?>.From(this.Arguments.AddRange(BoundObjectCreationExpression.GetChildInitializers(this.InitializerExpressionOpt)));
BoundTree\InterpolatedStringHandlerData.cs (1)
37Debug.Assert(construction is BoundObjectCreationExpression or BoundDynamicObjectCreationExpression or BoundBadExpression);
CodeGen\EmitExpression.cs (6)
107EmitObjectCreationExpression((BoundObjectCreationExpression)expression, used); 2268private static int GetObjCreationStackBehavior(BoundObjectCreationExpression objCreation) 2421private void EmitObjectCreationExpression(BoundObjectCreationExpression expression, bool used) 2462private bool TryEmitOptimizedReadonlySpan(BoundObjectCreationExpression expression, bool used, BoundExpression inPlaceTarget, out bool avoidInPlace) 2615if (right is BoundObjectCreationExpression objCreation) 2687private bool TryInPlaceCtorCall(BoundExpression target, BoundObjectCreationExpression objCreation, bool used)
CodeGen\Optimizer.cs (3)
951((BoundObjectCreationExpression)right).Constructor.ParameterCount != 0); 1315public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node) 2140public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Compilation\CSharpSemanticModel.cs (2)
3672var boundObjectCreation = (BoundObjectCreationExpression)boundNode;
FlowAnalysis\AbstractFlowPass.cs (1)
2067public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
FlowAnalysis\DefiniteAssignment.cs (2)
944var init = (BoundObjectCreationExpression)value;
FlowAnalysis\NullableWalker.cs (2)
3822public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 4140TrackNullableStateOfTupleElements(slot, containingType, arguments, argumentTypes, ((BoundObjectCreationExpression)node).ArgsToParamsOpt, useRestField: true);
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
19/// <see cref="BoundObjectCreationExpression"/>, or the input expression of a pattern-matching operation.
Generated\BoundNodes.xml.Generated.cs (10)
6381public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<MethodSymbol> constructorsGroup, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6385var result = new BoundObjectCreationExpression(this.Syntax, constructor, constructorsGroup, arguments, argumentNamesOpt, argumentRefKindsOpt, expanded, argsToParamsOpt, defaultArguments, constantValueOpt, initializerExpressionOpt, wasTargetTyped, type, this.HasErrors); 9204return VisitObjectCreationExpression((BoundObjectCreationExpression)node, arg); 9509public virtual R VisitObjectCreationExpression(BoundObjectCreationExpression node, A arg) => this.DefaultVisit(node, arg); 9745public virtual BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) => this.DefaultVisit(node); 10520public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 11916public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 14189public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 14195BoundObjectCreationExpression updatedNode; 16629public override TreeDumperNode VisitObjectCreationExpression(BoundObjectCreationExpression node, object? arg) => new TreeDumperNode("objectCreationExpression", null, new TreeDumperNode[]
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (3)
225return VisitObjectCreationExpression((BoundObjectCreationExpression)node); 1025private BoundExpression VisitObjectCreationExpression(BoundObjectCreationExpression node) 1047private BoundExpression VisitObjectCreationExpressionInternal(BoundObjectCreationExpression node)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
557public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Lowering\Extensions.cs (4)
53var creation = (BoundObjectCreationExpression)expr; 99var creation = (BoundObjectCreationExpression)expr;
Lowering\Instrumentation\CompoundInstrumenter.cs (1)
173public override BoundExpression InstrumentObjectCreationExpression(BoundObjectCreationExpression original, BoundExpression rewritten)
Lowering\Instrumentation\Instrumenter.cs (1)
246public virtual BoundExpression InstrumentObjectCreationExpression(BoundObjectCreationExpression original, BoundExpression rewritten)
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
546public override BoundExpression InstrumentObjectCreationExpression(BoundObjectCreationExpression original, BoundExpression rewritten)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
279public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
557loweredInput is BoundObjectCreationExpression expr && 613BoundObjectCreationExpression loweredInput,
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
566var call = _factory.New(constructor, arguments: [temp], argumentRefKinds: [asReadOnlySpan ? RefKindExtensions.StrictIn : RefKind.Ref]); 1054BoundObjectCreationExpression rewrittenReceiver;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
966var objCreation = (BoundObjectCreationExpression)expression;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
1000case BoundObjectCreationExpression { Arguments: { Length: 1 } args }:
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
729else if (unloweredExpr is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true }, InitializerExpressionOpt: null } &&
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (1)
31public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
483var wrappedChar = new BoundObjectCreationExpression(
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (3)
38var construction = (BoundObjectCreationExpression)data.Construction; 243Debug.Assert(((BoundObjectCreationExpression)data.Construction).Arguments.All(
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (2)
205case BoundObjectCreationExpression { Arguments: { Length: 0 }, Type: { } eType } _ when eType.IsNullableType(): 207case BoundObjectCreationExpression { Arguments: { Length: 1 }, Type: { } eType } creation when eType.IsNullableType():
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (1)
67BoundObjectCreationExpression currentCreation = new BoundObjectCreationExpression(syntax, smallestConstructor, smallestCtorArguments);
Lowering\SpillSequenceSpiller.cs (3)
480var objectCreationExpression = (BoundObjectCreationExpression)expression; 1412public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Lowering\SyntheticBoundNodeFactory.cs (6)
762public BoundObjectCreationExpression New(NamedTypeSymbol type, params BoundExpression[] args) 768public BoundObjectCreationExpression New(MethodSymbol ctor, params BoundExpression[] args) 771public BoundObjectCreationExpression New(NamedTypeSymbol type, ImmutableArray<BoundExpression> args) 777public BoundObjectCreationExpression New(MethodSymbol ctor, ImmutableArray<BoundExpression> args) 780public BoundObjectCreationExpression New(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKinds) 795public BoundObjectCreationExpression New(WellKnownMember wm, ImmutableArray<BoundExpression> args)
Operations\CSharpOperationFactory.cs (5)
66return CreateBoundObjectCreationExpressionOperation((BoundObjectCreationExpression)boundNode); 701private IOperation CreateBoundObjectCreationExpressionOperation(BoundObjectCreationExpression boundObjectCreationExpression) 833ImmutableArray<IOperation> initializers = CreateFromArray<BoundExpression, IOperation>(BoundObjectCreationExpression.GetChildInitializers(boundObjectInitializerExpression)); 842ImmutableArray<IOperation> initializers = CreateFromArray<BoundExpression, IOperation>(BoundObjectCreationExpression.GetChildInitializers(boundCollectionInitializerExpression)); 1249return (expr.CollectionCreation as BoundObjectCreationExpression)?.Constructor;
Operations\CSharpOperationFactory_Methods.cs (2)
219var objectCreation = (BoundObjectCreationExpression)containingExpression;
Symbols\Source\ParameterHelpers.cs (3)
1020return IsValidDefaultValue((BoundObjectCreationExpression)expression); 1023return conversion is { Conversion.IsObjectCreation: true, Operand: BoundObjectCreationExpression { WasTargetTyped: true } operand } && 1030private static bool IsValidDefaultValue(BoundObjectCreationExpression expression)