Operations\ControlFlowGraphBuilder.cs (17)
168localFunctions.ToImmutableAndFree(), localFunctionsMap.ToImmutable(),
205return builder.ToImmutableAndFree();
2025return builder.ToImmutableAndFree();
2074interpolatedStringBuilder.ToImmutableAndFree(),
4813return MakeInvalidOperation(operation.LimitValue.Syntax, booleanType, builder.ToImmutableAndFree());
4844return new InvocationOperation(method, constrainedToType: null, instance: null, isVirtual: false, builder.ToImmutableAndFree(),
6428return new AnonymousObjectCreationOperation(initializerBuilder.ToImmutableAndFree(), semanticModel: null,
6549return new ArrayInitializerOperation(builder.ToImmutableAndFree(), semanticModel: null, initializer.Syntax, IsImplicit(initializer));
6736return new TupleOperation(elementBuilder.ToImmutableAndFree(), tuple.NaturalType, semanticModel: null, tuple.Syntax, tuple.Type, IsImplicit(tuple));
7119return new InterpolatedStringOperation(partsBuilder.ToImmutableAndFree(), semanticModel: null, operation.Syntax, operation.Type, operation.GetConstantValue(), IsImplicit(operation));
7295arguments = builder.ToImmutableAndFree();
7514IOperation initializedInstance = new InvalidOperation(children.ToImmutableAndFree(), semanticModel: null, operation.Syntax, operation.Type,
7537VisitStatements(children.ToImmutableAndFree());
7544new InvalidOperation(VisitArray(children.ToImmutableAndFree()), semanticModel: null,
7875BlockOperation logicalBlock = BlockOperation.CreateTemporaryBlock(statementsBuilder.ToImmutableAndFree(), ((Operation)operation).OwningSemanticModel!, operation.Syntax);
7892VisitStatements(localFunctionsBuilder.ToImmutableAndFree());
8094return new AnonymousObjectCreationOperation(initializerBuilder.ToImmutableAndFree(), semanticModel: null, operation.Syntax, operation.Type, operation.IsImplicit);
Binder\Binder_Expressions.cs (26)
243symbols.ToImmutableAndFree(),
378boundArgs.ToImmutableAndFree(),
1008ImmutableArray<BoundExpression> subExpressions = builder.ToImmutableAndFree();
1014ImmutableArray<string> tupleNames = namesBuilder is null ? default : namesBuilder.ToImmutableAndFree();
1099var elements = elementTypesWithAnnotations.ToImmutableAndFree();
1100var locations = elementLocations.ToImmutableAndFree();
1117return new BoundTupleLiteral(node, boundArguments.ToImmutableAndFree(), elementNames, inferredPositions, tupleTypeOpt, hasErrors);
1201return (elementNames.ToImmutable(), builder.ToImmutableAndFree());
3682ImmutableArray<BoundExpression> collectionArgs = paramsArgsBuilder.ToImmutableAndFree();
3850handlerArgumentIndexes = handlerArgumentIndexesBuilder.ToImmutableAndFree();
3963additionalConstructorArguments: argumentPlaceholdersBuilder.ToImmutableAndFree(),
3964additionalConstructorRefKinds: argumentRefKindsBuilder.ToImmutableAndFree());
4171ImmutableArray<BoundExpression> arraySizes = sizes.ToImmutableAndFree();
4274return exprBuilder.ToImmutableAndFree();
4429return new BoundArrayInitialization(node, isInferred, initializers.ToImmutableAndFree(), hasErrors: hasErrors);
4637builder.ToImmutableAndFree(),
5381return new BoundUnconvertedCollectionExpression(syntax, firstWithElement, builder.ToImmutableAndFree());
5792return new BoundBadExpression(node, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(type), children.ToImmutableAndFree(), type) { WasCompilerGenerated = wasCompilerGenerated };
5885initializers.ToImmutableAndFree(),
6451return new BoundCollectionInitializerExpression(initializerSyntax, implicitReceiver, initializerBuilder.ToImmutableAndFree(), initializerType);
6554exprBuilder.ToImmutableAndFree(),
6790return builder == null ? constructors : builder.ToImmutableAndFree();
7075return new BoundBadExpression(node, resultKind, symbols.ToImmutableAndFree(), childNodes.ToImmutableAndFree(), type);
8546var methods = builder.ToImmutableAndFree();
12276var typeDescr = new AnonymousTypeDescriptor(fieldsBuilder.ToImmutableAndFree(), location);
Binder\Binder_Patterns.cs (6)
842return builder.ToImmutableAndFree();
1714deconstructionSubpatterns = patternsBuilder.ToImmutableAndFree();
1729deconstructionSubpatterns = patternsBuilder.ToImmutableAndFree();
2140return new BoundITuplePattern(node, iTupleGetLength, iTupleGetItem, subPatterns.ToImmutableAndFree(), inputType: strippedInputType, iTupleType, hasErrors);
2165deconstruction: subPatterns.ToImmutableAndFree(), properties: default, variable: null, variableAccess: null,
2271return builder.ToImmutableAndFree();
FlowAnalysis\NullableWalker.cs (14)
1030return builder.ToImmutableAndFree();
4937argumentResults = builder.ToImmutableAndFree();
5154var placeholders = placeholderBuilder.ToImmutableAndFree();
5274var placeholders = placeholdersBuilder.ToImmutableAndFree();
7059return builder.ToImmutableAndFree();
7094return builder.ToImmutableAndFree();
7896argsToParamsOpt = argsToParamsBuilder.ToImmutableAndFree();
7905refKindsOpt = refKindsBuilder.ToImmutableAndFree();
7908arguments = argumentsBuilder.ToImmutableAndFree();
8124return resultsBuilder.ToImmutableAndFree();
8887return builder.ToImmutableAndFree();
8932collection.Syntax, withElement: null, elements: elementsBuilder.ToImmutableAndFree())
11125method = InferMemberTypeArguments(method, arguments.ToImmutableAndFree(), argumentRefKindsOpt: default, argsToParamsOpt: default, expanded: false);
11501deconstructMethod = InferMemberTypeArguments(deconstructMethod, placeholderArgs.ToImmutableAndFree(), argumentRefKinds, argsToParams, invocation.Expanded);
Lowering\ClosureConversion\ClosureConversion.cs (14)
316body = new BoundBlock(body.Syntax, _addedLocals.ToImmutableAndFree(), _addedStatements.ToImmutableAndFree()) { WasCompilerGenerated = true };
506return environments.ToImmutableAndFree();
942arguments = argumentsBuilder.ToImmutableAndFree();
943argRefKinds = refkindsBuilder.ToImmutableAndFree();
1022return builder.ToImmutableAndFree();
1162return node.Update(newLocals.ToImmutableAndFree(), prologue.ToImmutableAndFree(), newValue, newType);
1210return node.Update(newLocals.ToImmutableAndFree(), node.LocalFunctions, node.HasUnsafeModifier, newInstrumentation, newStatements.ToImmutableAndFree());
1246var rewrittenCatchLocals = newLocals.ToImmutableAndFree();
1280rewrittenFilterPrologue = new BoundStatementList(rewrittenFilter.Syntax, prologueBuilder.ToImmutableAndFree());
1333return new BoundBlock(node.Syntax, newLocals.ToImmutableAndFree(), newStatements.ToImmutableAndFree(), node.HasErrors);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (8)
330return _bound.ArrayOrEmpty(ExpressionType, builder.ToImmutableAndFree());
341return _bound.ArrayOrEmpty(ExpressionType, builder.ToImmutableAndFree());
873var result = _bound.Sequence(locals.ToImmutableAndFree(), initializers.ToImmutableAndFree(),
878_bound.ArrayOrEmpty(ParameterExpressionType, parameters.ToImmutableAndFree())));
1039return _bound.ArrayOrEmpty(MemberBindingType, builder.ToImmutableAndFree());
1060return _bound.ArrayOrEmpty(ElementInitType, builder.ToImmutableAndFree());
1126ctor, args, _bound.ArrayOrEmpty(MemberInfoType, membersBuilder.ToImmutableAndFree()));
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (8)
52return _factory.Sequence(lhsTemps.ToImmutableAndFree(), lhsEffects.ToImmutableAndFree(), result);
97return _factory.Sequence(temps.ToImmutableAndFree(), effects.ToImmutableAndFree(), last);
106return _factory.Sequence(temps.ToImmutableAndFree(), effects.ToImmutableAndFree(), returnValue);
270right.Syntax, sourceTuple: null, wasTargetTyped: false, arguments: builder!.ToImmutableAndFree(), argumentNamesOpt: default, inferredNamesOpt: default, tupleType);
368return builder.ToImmutableAndFree();
409return outLocals.ToImmutableAndFree();
518return init.ToImmutableAndFree();
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (10)
38BoundExpression result = _factory.Sequence(temps.ToImmutableAndFree(), initEffects.ToImmutableAndFree(), returnValue);
83var newArguments = builder.ToImmutableAndFree();
129syntax, sourceTuple: null, wasTargetTyped: true, fieldAccessorsBuilder.ToImmutableAndFree(), ImmutableArray<string?>.Empty,
163var newArguments = builder.ToImmutableAndFree();
313BoundExpression innerSequence = _factory.Sequence(locals: ImmutableArray<LocalSymbol>.Empty, innerEffects.ToImmutableAndFree(), logicalExpression);
328return _factory.Sequence(ImmutableArray<LocalSymbol>.Empty, outerEffects.ToImmutableAndFree(),
336return _factory.Sequence(ImmutableArray<LocalSymbol>.Empty, outerEffects.ToImmutableAndFree(),
345_factory.Sequence(ImmutableArray<LocalSymbol>.Empty, outerEffects.ToImmutableAndFree(),
465arguments: argumentBuilder.ToImmutableAndFree(),
Lowering\StateMachineRewriter\RefInitializationHoister.cs (4)
92proxies.Add(local, new CapturedToExpressionSymbolReplacement<THoistedSymbol>(replacement, hoistedSymbols.ToImmutableAndFree(), isReusable: true));
99return _factory.Sequence(ImmutableArray.Create(sacrificialTemp), sideEffects.ToImmutableAndFree(), _factory.AssignmentExpression(_factory.Local(sacrificialTemp), replacement, isRef: true));
110return _factory.Sequence(ImmutableArray<LocalSymbol>.Empty, sideEffects.ToImmutableAndFree(), last);
183return array.Update(expression, indices.ToImmutableAndFree(), array.Type);