29 instantiations of BoundObjectCreationExpression
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Invocation.cs (2)
1397defaultValue = new BoundObjectCreationExpression(syntax, methodSymbol, unknownArgument) { WasCompilerGenerated = true }; 1406defaultValue = new BoundObjectCreationExpression(syntax, methodSymbol, dispatchArgument) { WasCompilerGenerated = true };
Generated\BoundNodes.xml.Generated.cs (1)
6382var result = new BoundObjectCreationExpression(this.Syntax, constructor, constructorsGroup, arguments, argumentNamesOpt, argumentRefKindsOpt, expanded, argsToParamsOpt, defaultArguments, constantValueOpt, initializerExpressionOpt, wasTargetTyped, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
681new BoundObjectCreationExpression(syntax: syntax, constructor: constructor),
Lowering\LocalRewriter\LocalRewriter_AnonymousObjectCreation.cs (1)
23return new BoundObjectCreationExpression(
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
1353return new BoundObjectCreationExpression( 1649return new BoundObjectCreationExpression(
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
322return new BoundObjectCreationExpression(syntax, spanConstructor, array); 442arrayOrList = 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)); 1065return new BoundObjectCreationExpression(syntax, ctor, rewrittenConversion); 1176BoundExpression consequence = new BoundObjectCreationExpression( 1260return new BoundObjectCreationExpression( 1385return 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)
368BoundExpression consequence = new BoundObjectCreationExpression( 689BoundExpression consequence = new BoundObjectCreationExpression(syntax, ctor, userDefinedCall); 756boundOne = new BoundObjectCreationExpression(node.Syntax, ctor, boundOne); 847BoundExpression consequence = new BoundObjectCreationExpression(syntax, ctor, methodCall);
Lowering\SyntheticBoundNodeFactory.cs (3)
747=> new BoundObjectCreationExpression(Syntax, ctor, args) { WasCompilerGenerated = true }; 750=> new BoundObjectCreationExpression( 767return new BoundObjectCreationExpression(Syntax, ctor, args) { WasCompilerGenerated = true };
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
510new BoundObjectCreationExpression( 587new BoundObjectCreationExpression(
97 references to BoundObjectCreationExpression
Microsoft.CodeAnalysis.CSharp (97)
Binder\Binder.ValueChecks.cs (4)
4282var objectCreation = (BoundObjectCreationExpression)expr; 5023var objectCreation = (BoundObjectCreationExpression)expr;
Binder\Binder_Expressions.cs (5)
6707private BoundObjectCreationExpression BindClassCreationExpressionContinued( 6771var creation = new BoundObjectCreationExpression( 6964var creation = (BoundObjectCreationExpression)classCreation; 9246else 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)
725public 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)
952((BoundObjectCreationExpression)right).Constructor.ParameterCount != 0); 1316public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node) 2141public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Compilation\CSharpSemanticModel.cs (2)
3662var boundObjectCreation = (BoundObjectCreationExpression)boundNode;
FlowAnalysis\AbstractFlowPass.cs (1)
2061public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
FlowAnalysis\DefiniteAssignment.cs (2)
943var init = (BoundObjectCreationExpression)value;
FlowAnalysis\NullableWalker.cs (2)
3664public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 3980TrackNullableStateOfTupleElements(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)
6378public 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) 6382var result = new BoundObjectCreationExpression(this.Syntax, constructor, constructorsGroup, arguments, argumentNamesOpt, argumentRefKindsOpt, expanded, argsToParamsOpt, defaultArguments, constantValueOpt, initializerExpressionOpt, wasTargetTyped, type, this.HasErrors); 9165return VisitObjectCreationExpression((BoundObjectCreationExpression)node, arg); 9470public virtual R VisitObjectCreationExpression(BoundObjectCreationExpression node, A arg) => this.DefaultVisit(node, arg); 9706public virtual BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) => this.DefaultVisit(node); 10481public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 11764public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 14003public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 14009BoundObjectCreationExpression updatedNode; 16442public 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)
520public 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)
555loweredInput is BoundObjectCreationExpression expr && 611BoundObjectCreationExpression loweredInput,
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
552var call = _factory.New(constructor, arguments: [temp], argumentRefKinds: [asReadOnlySpan ? RefKindExtensions.StrictIn : RefKind.Ref]); 1010BoundObjectCreationExpression rewrittenReceiver;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
908var objCreation = (BoundObjectCreationExpression)expression;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
1002case 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 (2)
244Value: BoundObjectCreationExpression { Constructor: var objectCreationConstructor, Arguments: [BoundLocal constructorLocal] } 546var 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\MethodToClassRewriter.cs (3)
561public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node) 563var rewritten = (BoundObjectCreationExpression?)base.VisitObjectCreationExpression(node);
Lowering\SpillSequenceSpiller.cs (3)
480var objectCreationExpression = (BoundObjectCreationExpression)expression; 1412public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Lowering\SyntheticBoundNodeFactory.cs (6)
731public BoundObjectCreationExpression New(NamedTypeSymbol type, params BoundExpression[] args) 737public BoundObjectCreationExpression New(MethodSymbol ctor, params BoundExpression[] args) 740public BoundObjectCreationExpression New(NamedTypeSymbol type, ImmutableArray<BoundExpression> args) 746public BoundObjectCreationExpression New(MethodSymbol ctor, ImmutableArray<BoundExpression> args) 749public BoundObjectCreationExpression New(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKinds) 764public 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)
890return IsValidDefaultValue((BoundObjectCreationExpression)expression); 893return conversion is { Conversion.IsObjectCreation: true, Operand: BoundObjectCreationExpression { WasTargetTyped: true } operand } && 900private static bool IsValidDefaultValue(BoundObjectCreationExpression expression)