Operations\ControlFlowGraphBuilder.cs (17)
168localFunctions.ToImmutableAndFree(), localFunctionsMap.ToImmutable(),
197return builder.ToImmutableAndFree();
2015return builder.ToImmutableAndFree();
2064interpolatedStringBuilder.ToImmutableAndFree(),
4802return MakeInvalidOperation(operation.LimitValue.Syntax, booleanType, builder.ToImmutableAndFree());
4833return new InvocationOperation(method, constrainedToType: null, instance: null, isVirtual: false, builder.ToImmutableAndFree(),
6417return new AnonymousObjectCreationOperation(initializerBuilder.ToImmutableAndFree(), semanticModel: null,
6538return new ArrayInitializerOperation(builder.ToImmutableAndFree(), semanticModel: null, initializer.Syntax, IsImplicit(initializer));
6703return new TupleOperation(elementBuilder.ToImmutableAndFree(), tuple.NaturalType, semanticModel: null, tuple.Syntax, tuple.Type, IsImplicit(tuple));
7083return new InterpolatedStringOperation(partsBuilder.ToImmutableAndFree(), semanticModel: null, operation.Syntax, operation.Type, operation.GetConstantValue(), IsImplicit(operation));
7259arguments = builder.ToImmutableAndFree();
7472IOperation initializedInstance = new InvalidOperation(children.ToImmutableAndFree(), semanticModel: null, operation.Syntax, operation.Type,
7495VisitStatements(children.ToImmutableAndFree());
7502new InvalidOperation(VisitArray(children.ToImmutableAndFree()), semanticModel: null,
7833BlockOperation logicalBlock = BlockOperation.CreateTemporaryBlock(statementsBuilder.ToImmutableAndFree(), ((Operation)operation).OwningSemanticModel!, operation.Syntax);
7850VisitStatements(localFunctionsBuilder.ToImmutableAndFree());
8052return new AnonymousObjectCreationOperation(initializerBuilder.ToImmutableAndFree(), semanticModel: null, operation.Syntax, operation.Type, operation.IsImplicit);
Binder\Binder_Expressions.cs (26)
224symbols.ToImmutableAndFree(),
346boundArgs.ToImmutableAndFree(),
973ImmutableArray<BoundExpression> subExpressions = builder.ToImmutableAndFree();
979ImmutableArray<string> tupleNames = namesBuilder is null ? default : namesBuilder.ToImmutableAndFree();
1064var elements = elementTypesWithAnnotations.ToImmutableAndFree();
1065var locations = elementLocations.ToImmutableAndFree();
1082return new BoundTupleLiteral(node, boundArguments.ToImmutableAndFree(), elementNames, inferredPositions, tupleTypeOpt, hasErrors);
1166return (elementNames.ToImmutable(), builder.ToImmutableAndFree());
3605ImmutableArray<BoundExpression> collectionArgs = paramsArgsBuilder.ToImmutableAndFree();
3769handlerArgumentIndexes = handlerArgumentIndexesBuilder.ToImmutableAndFree();
3874additionalConstructorArguments: argumentPlaceholdersBuilder.ToImmutableAndFree(),
3875additionalConstructorRefKinds: argumentRefKindsBuilder.ToImmutableAndFree());
4081ImmutableArray<BoundExpression> arraySizes = sizes.ToImmutableAndFree();
4184return exprBuilder.ToImmutableAndFree();
4339return new BoundArrayInitialization(node, isInferred, initializers.ToImmutableAndFree(), hasErrors: hasErrors);
4547builder.ToImmutableAndFree(),
5263return new BoundUnconvertedCollectionExpression(syntax, builder.ToImmutableAndFree());
5606return new BoundBadExpression(node, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(type), children.ToImmutableAndFree(), type) { WasCompilerGenerated = wasCompilerGenerated };
5710initializers.ToImmutableAndFree(),
6289return new BoundCollectionInitializerExpression(initializerSyntax, implicitReceiver, initializerBuilder.ToImmutableAndFree(), initializerType);
6392exprBuilder.ToImmutableAndFree(),
6628return builder == null ? constructors : builder.ToImmutableAndFree();
6905return new BoundBadExpression(node, resultKind, symbols.ToImmutableAndFree(), childNodes.ToImmutableAndFree(), type);
8289var methods = builder.ToImmutableAndFree();
11270var typeDescr = new AnonymousTypeDescriptor(fieldsBuilder.ToImmutableAndFree(), location);
Binder\Binder_Patterns.cs (6)
286return builder.ToImmutableAndFree();
1012deconstructionSubpatterns = patternsBuilder.ToImmutableAndFree();
1024deconstructionSubpatterns = patternsBuilder.ToImmutableAndFree();
1408return new BoundITuplePattern(node, iTupleGetLength, iTupleGetItem, subPatterns.ToImmutableAndFree(), strippedInputType, iTupleType, hasErrors);
1431deconstruction: subPatterns.ToImmutableAndFree(), properties: default, variable: null, variableAccess: null,
1507return builder.ToImmutableAndFree();
Lowering\ClosureConversion\ClosureConversion.cs (14)
306body = new BoundBlock(body.Syntax, _addedLocals.ToImmutableAndFree(), _addedStatements.ToImmutableAndFree()) { WasCompilerGenerated = true };
496return environments.ToImmutableAndFree();
932arguments = argumentsBuilder.ToImmutableAndFree();
933argRefKinds = refkindsBuilder.ToImmutableAndFree();
1012return builder.ToImmutableAndFree();
1152return node.Update(newLocals.ToImmutableAndFree(), prologue.ToImmutableAndFree(), newValue, newType);
1200return node.Update(newLocals.ToImmutableAndFree(), node.LocalFunctions, node.HasUnsafeModifier, newInstrumentation, newStatements.ToImmutableAndFree());
1236var rewrittenCatchLocals = newLocals.ToImmutableAndFree();
1270rewrittenFilterPrologue = new BoundStatementList(rewrittenFilter.Syntax, prologueBuilder.ToImmutableAndFree());
1323return new BoundBlock(node.Syntax, newLocals.ToImmutableAndFree(), newStatements.ToImmutableAndFree(), node.HasErrors);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (8)
323return _bound.ArrayOrEmpty(ExpressionType, builder.ToImmutableAndFree());
334return _bound.ArrayOrEmpty(ExpressionType, builder.ToImmutableAndFree());
853var result = _bound.Sequence(locals.ToImmutableAndFree(), initializers.ToImmutableAndFree(),
858_bound.ArrayOrEmpty(ParameterExpressionType, parameters.ToImmutableAndFree())));
993return _bound.ArrayOrEmpty(MemberBindingType, builder.ToImmutableAndFree());
1014return _bound.ArrayOrEmpty(ElementInitType, builder.ToImmutableAndFree());
1074ctor, 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);
269right.Syntax, sourceTuple: null, wasTargetTyped: false, arguments: builder!.ToImmutableAndFree(), argumentNamesOpt: default, inferredNamesOpt: default, tupleType);
367return builder.ToImmutableAndFree();
408return outLocals.ToImmutableAndFree();
517return init.ToImmutableAndFree();
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (10)
38BoundExpression result = _factory.Sequence(temps.ToImmutableAndFree(), initEffects.ToImmutableAndFree(), returnValue);
82var newArguments = builder.ToImmutableAndFree();
126syntax, sourceTuple: null, wasTargetTyped: true, fieldAccessorsBuilder.ToImmutableAndFree(), ImmutableArray<string?>.Empty,
160var newArguments = builder.ToImmutableAndFree();
308BoundExpression innerSequence = _factory.Sequence(locals: ImmutableArray<LocalSymbol>.Empty, innerEffects.ToImmutableAndFree(), logicalExpression);
322return _factory.Sequence(ImmutableArray<LocalSymbol>.Empty, outerEffects.ToImmutableAndFree(),
330return _factory.Sequence(ImmutableArray<LocalSymbol>.Empty, outerEffects.ToImmutableAndFree(),
339_factory.Sequence(ImmutableArray<LocalSymbol>.Empty, outerEffects.ToImmutableAndFree(),
458arguments: argumentBuilder.ToImmutableAndFree(),
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (6)
560proxies.Add(local, new CapturedToExpressionSymbolReplacement(replacement, hoistedFields.ToImmutableAndFree(), isReusable: true));
567return F.Sequence(ImmutableArray.Create(sacrificialTemp), sideEffects.ToImmutableAndFree(), F.AssignmentExpression(F.Local(sacrificialTemp), replacement, isRef: true));
578return F.Sequence(ImmutableArray<LocalSymbol>.Empty, sideEffects.ToImmutableAndFree(), last);
603return array.Update(expression, indices.ToImmutableAndFree(), array.Type);
792translated = node.Update(newLocalsBuilder.ToImmutableAndFree(), statements);
804newLocals = newLocalsBuilder.ToImmutableAndFree();