12 instantiations of ArrayBuilder
Microsoft.CodeAnalysis (12)
CodeGen\ItemTokenMap.cs (1)
23private readonly ArrayBuilder<T> _items = new ArrayBuilder<T>();
CodeGen\LocalSlotManager.cs (2)
85_lazyAllLocals = new ArrayBuilder<Cci.ILocalDefinition>(); 201_lazyAllLocals = new ArrayBuilder<Cci.ILocalDefinition>(1);
Collections\OrderedSet.cs (1)
19_list = new ArrayBuilder<T>();
CommandLine\AnalyzerConfigSet.cs (1)
540ArrayBuilder<Section> namedSectionBuilder = new ArrayBuilder<Section>(_values.Count);
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (3)
319var builder = new ArrayBuilder<ParameterInfo>(); 660var builder = new ArrayBuilder<TypeInfo>(); 740var builder = new ArrayBuilder<IMethodSymbol>();
InternalUtilities\SetWithInsertionOrder.cs (1)
28_elements = new ArrayBuilder<T>();
MetadataReader\PEModule.cs (2)
678var result = new ArrayBuilder<IGrouping<string, TypeDefinitionHandle>>(namespaces.Count); 756namespaceHandles.Add(nsHandle, new ArrayBuilder<TypeDefinitionHandle> { typeDef });
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
495pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool!), size);
1712 references to ArrayBuilder
Microsoft.CodeAnalysis (871)
CodeGen\ArrayMembers.cs (4)
200var parameters = ArrayBuilder<ArrayMethodParameterInfo>.GetInstance(rank + 1); 308var parameters = ArrayBuilder<ArrayMethodParameterInfo>.GetInstance(rank);
CodeGen\BasicBlock.cs (1)
736public void GetBranchBlocks(ArrayBuilder<BasicBlock> branchBlocksBuilder)
CodeGen\ILBuilder.cs (18)
51public ArrayBuilder<RawSequencePoint> SeqPointsOpt; 65private ArrayBuilder<ILMarker> _allocatedILMarkers; 261ArrayBuilder<BasicBlock> reachableBlocks = ArrayBuilder<BasicBlock>.GetInstance(); 271private static void PushReachableBlockToProcess(ArrayBuilder<BasicBlock> reachableBlocks, BasicBlock block) 282private static void MarkReachableFrom(ArrayBuilder<BasicBlock> reachableBlocks, BasicBlock block) 333private static void MarkReachableFromBranch(ArrayBuilder<BasicBlock> reachableBlocks, BasicBlock block) 427private static void MarkReachableFromTry(ArrayBuilder<BasicBlock> reachableBlocks, BasicBlock block) 469private static void MarkReachableFromFilter(ArrayBuilder<BasicBlock> reachableBlocks, BasicBlock block) 478private static void MarkReachableFromSwitch(ArrayBuilder<BasicBlock> reachableBlocks, BasicBlock block) 481var blockBuilder = ArrayBuilder<BasicBlock>.GetInstance(); 927var blockBuilder = ArrayBuilder<BasicBlock>.GetInstance(); 980ArrayBuilder<RawSequencePoint> seqPoints = ArrayBuilder<RawSequencePoint>.GetInstance(); 1024this.SeqPointsOpt = ArrayBuilder<RawSequencePoint>.GetInstance(); 1237_allocatedILMarkers = ArrayBuilder<ILMarker>.GetInstance();
CodeGen\ItemTokenMap.cs (1)
23private readonly ArrayBuilder<T> _items = new ArrayBuilder<T>();
CodeGen\LocalScopeManager.cs (19)
122var result = ArrayBuilder<Cci.LocalScope>.GetInstance(); 151var result = ArrayBuilder<Cci.ExceptionHandlerRegion>.GetInstance(); 158var result = ArrayBuilder<StateMachineHoistedLocalScope>.GetInstance(); 250internal abstract void GetExceptionHandlerRegions(ArrayBuilder<Cci.ExceptionHandlerRegion> regions); 256internal abstract ScopeBounds GetLocalScopes(ArrayBuilder<Cci.LocalScope> result); 258protected static ScopeBounds GetLocalScopes<TScopeInfo>(ArrayBuilder<Cci.LocalScope> result, ImmutableArray<TScopeInfo>.Builder scopes) 280internal abstract ScopeBounds GetHoistedLocalScopes(ArrayBuilder<StateMachineHoistedLocalScope> result); 282protected static ScopeBounds GetHoistedLocalScopes<TScopeInfo>(ArrayBuilder<StateMachineHoistedLocalScope> result, ImmutableArray<TScopeInfo>.Builder scopes) 415internal override void GetExceptionHandlerRegions(ArrayBuilder<Cci.ExceptionHandlerRegion> regions) 426internal override ScopeBounds GetLocalScopes(ArrayBuilder<Cci.LocalScope> result) 471internal override ScopeBounds GetHoistedLocalScopes(ArrayBuilder<StateMachineHoistedLocalScope> result) 747internal override void GetExceptionHandlerRegions(ArrayBuilder<Cci.ExceptionHandlerRegion> regions) 814internal override ScopeBounds GetLocalScopes(ArrayBuilder<Cci.LocalScope> scopesWithVariables) 817internal override ScopeBounds GetHoistedLocalScopes(ArrayBuilder<StateMachineHoistedLocalScope> result) 822var scopes = ArrayBuilder<Cci.LocalScope>.GetInstance();
CodeGen\LocalSlotManager.cs (1)
71private ArrayBuilder<Cci.ILocalDefinition>? _lazyAllLocals;
CodeGen\MethodBody.cs (2)
113var sequencePointsBuilder = ArrayBuilder<Cci.SequencePoint>.GetInstance();
CodeGen\PrivateImplementationDetails.cs (2)
155ArrayBuilder<SynthesizedStaticField> fieldsBuilder = ArrayBuilder<SynthesizedStaticField>.GetInstance(
CodeGen\SequencePointList.cs (3)
47public static SequencePointList Create(ArrayBuilder<RawSequencePoint> seqPointBuilder, ILBuilder builder) 90private static OffsetAndSpan[] GetSubArray(ArrayBuilder<RawSequencePoint> seqPointBuilder, int start, int length, ILBuilder builder) 112ArrayBuilder<Cci.SequencePoint> builder)
CodeGen\SwitchIntegralJumpTableEmitter.cs (4)
184var switchBucketsStack = ArrayBuilder<SwitchBucket>.GetInstance(); 223var crumbled = ArrayBuilder<SwitchBucket>.GetInstance();
CodeGen\VariableSlotAllocator.cs (1)
16public abstract void AddPreviousLocals(ArrayBuilder<Cci.ILocalDefinition> builder);
Collections\ArrayBuilderExtensions.cs (25)
15public static bool Any<T>(this ArrayBuilder<T> builder, Func<T, bool> predicate) 27public static bool Any<T, A>(this ArrayBuilder<T> builder, Func<T, A, bool> predicate, A arg) 39public static bool All<T>(this ArrayBuilder<T> builder, Func<T, bool> predicate) 51public static bool All<T, A>(this ArrayBuilder<T> builder, Func<T, A, bool> predicate, A arg) 71public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ArrayBuilder<TItem> items, Func<TItem, TResult> map) 91var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 111public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ArrayBuilder<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 131var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 151public static ImmutableArray<TResult> SelectAsArrayWithIndex<TItem, TArg, TResult>(this ArrayBuilder<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg) 171var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 181public static void AddOptional<T>(this ArrayBuilder<T> builder, T? item) 193public static void Push<T>(this ArrayBuilder<T> builder, T e) 198public static T Pop<T>(this ArrayBuilder<T> builder) 205public static bool TryPop<T>(this ArrayBuilder<T> builder, [MaybeNullWhen(false)] out T result) 217public static T Peek<T>(this ArrayBuilder<T> builder) 222public static ImmutableArray<T> ToImmutableOrEmptyAndFree<T>(this ArrayBuilder<T>? builder) 227public static void AddIfNotNull<T>(this ArrayBuilder<T> builder, T? value) 236public static void AddIfNotNull<T>(this ArrayBuilder<T> builder, T? value) 245public static void FreeAll<T>(this ArrayBuilder<T> builder, Func<T, ArrayBuilder<T>?> getNested) 259public static OneOrMany<T> ToOneOrManyAndFree<T>(this ArrayBuilder<T> builder) 275public static void RemoveWhere<TItem, TArg>(this ArrayBuilder<TItem> builder, Func<TItem, int, TArg, bool> filter, TArg arg)
Collections\CachingDictionary.cs (1)
116public void AddValues(ArrayBuilder<TElement> array)
Collections\DictionaryExtensions.cs (4)
79public static void AddPooled<K, V>(this IDictionary<K, ArrayBuilder<V>> dictionary, K key, V value) 82if (!dictionary.TryGetValue(key, out var values)) 84values = ArrayBuilder<V>.GetInstance(); 91public static ImmutableSegmentedDictionary<K, ImmutableArray<V>> ToImmutableSegmentedDictionaryAndFree<K, V>(this IReadOnlyDictionary<K, ArrayBuilder<V>> builder)
Collections\ImmutableArrayExtensions.cs (36)
191var builder = ArrayBuilder<TResult>.GetInstance(items.Length); 217var builder = ArrayBuilder<TResult>.GetInstance(); 247var builder = ArrayBuilder<TResult>.GetInstance(); 272var builder = ArrayBuilder<TResult>.GetInstance(); 292var builder = ArrayBuilder<TResult>.GetInstance(); 312var builder = ArrayBuilder<TResult>.GetInstance(); 335var builder = ArrayBuilder<TResult>.GetInstance(); 359var builder = ArrayBuilder<TResult>.GetInstance(); 383var builder = ArrayBuilder<TResult>.GetInstance(); 408var builder = ArrayBuilder<TResult>.GetInstance(); 470var builder = ArrayBuilder<TResult>.GetInstance(); 524var builder = ArrayBuilder<TResult>.GetInstance(self.Length); 553ArrayBuilder<T>? builder = null; 573builder = ArrayBuilder<T>.GetInstance(); 591builder = ArrayBuilder<T>.GetInstance(); 824var builder = ArrayBuilder<T>.GetInstance(); 866var builder = ArrayBuilder<TValue>.GetInstance(); 1152if (existingValueOrArray is ArrayBuilder<T> arrayBuilder) 1159arrayBuilder = ArrayBuilder<T>.GetInstance(capacity: 2); 1187if (value is ArrayBuilder<TNamespaceOrTypeSymbol> builder) 1253var builder = ArrayBuilder<TNamedTypeSymbol>.GetInstance(count);
Collections\OrderedSet.cs (2)
14private readonly ArrayBuilder<T> _list; 68public ArrayBuilder<T>.Enumerator GetEnumerator()
Collections\OrderPreservingMultiDictionary.cs (16)
186/// Each value is either a single V or an <see cref="ArrayBuilder{V}"/>. 196internal ValueSet(ArrayBuilder<V> values) 203var arrayBuilder = _value as ArrayBuilder<V>; 213var arrayBuilder = _value as ArrayBuilder<V>; 235var arrayBuilder = _value as ArrayBuilder<V>; 264var arrayBuilder = _value as ArrayBuilder<V>; 276var arrayBuilder = _value as ArrayBuilder<V>; 290internal int Count => (_value as ArrayBuilder<V>)?.Count ?? 1; 311var arrayBuilder = _value as ArrayBuilder<V>; 321arrayBuilder = ArrayBuilder<V>.GetInstance(capacity: 2);
Collections\TemporaryArray`1.cs (5)
80private ArrayBuilder<T>? _builder; 98_builder = ArrayBuilder<T>.GetInstance(capacity) 327/// <see cref="ArrayBuilder{T}"/> instance is taken from the shared pool, and all elements currently in inline 335var builder = ArrayBuilder<T>.GetInstance();
Collections\TopologicalSort.cs (8)
53var ready = ArrayBuilder<TNode>.GetInstance(); 63var resultBuilder = ArrayBuilder<TNode>.GetInstance(); 103var toCount = ArrayBuilder<TNode>.GetInstance(); 104var allNodesBuilder = ArrayBuilder<TNode>.GetInstance();
CommandLine\AnalyzerConfig.SectionNameMatching.cs (4)
109var numberRangePairs = ArrayBuilder<(int minValue, int maxValue)>.GetInstance(); 233ArrayBuilder<(int minValue, int maxValue)> numberRangePairs) 373ArrayBuilder<(int, int)> numberRangePairs)
CommandLine\AnalyzerConfigSet.cs (21)
128var sortedAnalyzerConfigs = ArrayBuilder<AnalyzerConfig>.GetInstance(analyzerConfigs.Count); 141var allMatchers = ArrayBuilder<ImmutableArray<SectionNameMatcher?>>.GetInstance(_analyzerConfigs.Length); 147var builder = ArrayBuilder<SectionNameMatcher?>.GetInstance(config.NamedSections.Length); 245var diagnosticBuilder = ArrayBuilder<Diagnostic>.GetInstance(); 373var diagnosticBuilder = ArrayBuilder<Diagnostic>.GetInstance(); 395private static void ParseSectionOptions(Section section, TreeOptions.Builder treeBuilder, AnalyzerOptions.Builder analyzerBuilder, ArrayBuilder<Diagnostic> diagnosticBuilder, string analyzerConfigPath, ConcurrentDictionary<ReadOnlyMemory<char>, string> diagIdCache) 450/// <param name="analyzerConfigs">An <see cref="ArrayBuilder{T}"/> of <see cref="AnalyzerConfig"/> containing a mix of regular and unmerged partial global configs</param> 453internal static GlobalAnalyzerConfig MergeGlobalConfigs(ArrayBuilder<AnalyzerConfig> analyzerConfigs, out ImmutableArray<Diagnostic> diagnostics) 478private ImmutableDictionary<string, ImmutableDictionary<string, (int globalLevel, ArrayBuilder<string> configPaths)>.Builder>.Builder? _duplicates; 488_duplicates = ImmutableDictionary.CreateBuilder<string, ImmutableDictionary<string, (int, ArrayBuilder<string>)>.Builder>(Section.NameEqualityComparer); 524foreach ((var keyName, (_, var configPaths)) in keys) 540ArrayBuilder<Section> namedSectionBuilder = new ArrayBuilder<Section>(_values.Count); 582(int globalLevel, ArrayBuilder<string> configPaths) duplicateValue = default; 608duplicateDict = ImmutableDictionary.CreateBuilder<string, (int, ArrayBuilder<string>)>(Section.PropertiesKeyComparer); 613ArrayBuilder<string> configList = duplicateValue.configPaths ?? ArrayBuilder<string>.GetInstance();
CommandLine\CommandLineArguments.cs (2)
520var resolvedReferencesList = ArrayBuilder<AnalyzerFileReference>.GetInstance();
CommandLine\CommandLineParser.cs (21)
212var parts = ArrayBuilder<ReadOnlyMemory<char>>.GetInstance(); 345var pathMapBuilder = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(); 391var result = ArrayBuilder<string>.GetInstance(); 492ArrayBuilder<string> processedArgs, 501var args = ArrayBuilder<string>.GetInstance(); 831var parts = ArrayBuilder<ReadOnlyMemory<char>>.GetInstance(); 1032var builder = ArrayBuilder<ReadOnlyMemory<char>>.GetInstance(); 1037internal static void ParseSeparatedPathsEx(ReadOnlyMemory<char>? str, ArrayBuilder<ReadOnlyMemory<char>> builder) 1049internal static void ParseSeparatedStrings(ReadOnlyMemory<char>? strMemory, char[] separators, bool removeEmptyEntries, ArrayBuilder<ReadOnlyMemory<char>> builder) 1121internal void ParseFileArgument(ReadOnlyMemory<char> arg, string? baseDirectory, ArrayBuilder<string> filePathBuilder, IList<Diagnostic> errors) 1153private protected void ParseSeparatedFileArgument(ReadOnlyMemory<char> value, string? baseDirectory, ArrayBuilder<string> filePathBuilder, IList<Diagnostic> errors) 1155var pathBuilder = ArrayBuilder<ReadOnlyMemory<char>>.GetInstance(); 1171var builder = ArrayBuilder<string>.GetInstance();
CommandLine\CommonCompiler.cs (8)
301var configs = ArrayBuilder<AnalyzerConfig>.GetInstance(analyzerConfigPaths.Length); 1155var analyzerOptionsBuilder = hasAnalyzerConfigs ? ArrayBuilder<AnalyzerConfigOptionsResult>.GetInstance(generatedSyntaxTrees.Count) : null; 1156var embeddedTextBuilder = ArrayBuilder<EmbeddedText>.GetInstance(generatedSyntaxTrees.Count); 1600var builder = ArrayBuilder<AdditionalTextFile>.GetInstance();
CommandLine\SarifV2ErrorLogger.cs (2)
232var effectiveSeveritiesBuilder = ArrayBuilder<(string DescriptorId, int DescriptorIndex, ImmutableHashSet<ReportDiagnostic> EffectiveSeverities)>.GetInstance(_descriptors.Count);
Compilation\Compilation.cs (4)
1255ArrayBuilder<INamedTypeSymbol>? typesByMetadataName = null; 1284typesByMetadataName ??= ArrayBuilder<INamedTypeSymbol>.GetInstance(); 3427ArrayBuilder<MethodDefinitionHandle> updatedMethods, 3428ArrayBuilder<TypeDefinitionHandle> changedTypes,
Compilation\CompilationOptions.cs (4)
328var builder = ArrayBuilder<Diagnostic>.GetInstance(); 562internal abstract void ValidateOptions(ArrayBuilder<Diagnostic> builder); 564internal void ValidateOptions(ArrayBuilder<Diagnostic> builder, CommonMessageProvider messageProvider)
Compilation\ParseOptions.cs (4)
47var builder = ArrayBuilder<Diagnostic>.GetInstance(); 77internal abstract void ValidateOptions(ArrayBuilder<Diagnostic> builder); 79internal void ValidateOptions(ArrayBuilder<Diagnostic> builder, CommonMessageProvider messageProvider)
Compilation\SemanticModel.cs (2)
882internal abstract void ComputeDeclarationsInSpan(TextSpan span, bool getSymbol, ArrayBuilder<DeclarationInfo> builder, CancellationToken cancellationToken); 887internal abstract void ComputeDeclarationsInNode(SyntaxNode node, ISymbol associatedSymbol, bool getSymbol, ArrayBuilder<DeclarationInfo> builder, CancellationToken cancellationToken, int? levelsToCompute = null);
Diagnostic\DiagnosticBag.cs (2)
201ArrayBuilder<TDiagnostic> builder = ArrayBuilder<TDiagnostic>.GetInstance();
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (2)
101var contexts = ArrayBuilder<DirectoryLoadContext>.GetInstance();
DiagnosticAnalyzer\AnalyzerDriver.cs (37)
901var builder = ArrayBuilder<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)>.GetInstance(); 1065var builder = ArrayBuilder<Diagnostic>.GetInstance(reportedDiagnostics.Length); 1099var tasks = ArrayBuilder<Task>.GetInstance(); 1154var programmaticSuppressionsBuilder = PooledDictionary<Diagnostic, ArrayBuilder<Suppression>>.GetInstance(); 1158if (!programmaticSuppressionsBuilder.TryGetValue(programmaticSuppression.SuppressedDiagnostic, out var array)) 1160array = ArrayBuilder<Suppression>.GetInstance(); 1328var declarationInfoBuilder = ArrayBuilder<DeclarationInfo>.GetInstance(); 1455var builder = ArrayBuilder<(DiagnosticAnalyzer, ImmutableArray<ImmutableArray<SymbolAnalyzerAction>>)>.GetInstance(); 1457var actionsByKindBuilder = ArrayBuilder<ArrayBuilder<SymbolAnalyzerAction>>.GetInstance(); 1469actionsByKindBuilder.Add(ArrayBuilder<SymbolAnalyzerAction>.GetInstance()); 1487var builder = ArrayBuilder<(DiagnosticAnalyzer, ImmutableArray<TAnalyzerAction>)>.GetInstance(); 1828var completedAnalyzers = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(); 2544var builder = ArrayBuilder<DeclarationInfo>.GetInstance(); 2556private static void ComputeDeclarationsInNode(SemanticModel semanticModel, ISymbol declaredSymbol, SyntaxNode declaringReferenceSyntax, SyntaxNode topmostNodeForAnalysis, ArrayBuilder<DeclarationInfo> builder, CancellationToken cancellationToken) 2606var nodesToAnalyze = declarationAnalysisData.DescendantNodesToAnalyze; 2612void executeNodeActionsByKind(ArrayBuilder<SyntaxNode> nodesToAnalyze, GroupedAnalyzerActions groupedActions, bool arePerSymbolActions) 2629var filteredNodesToAnalyze = ArrayBuilder<SyntaxNode>.GetInstance(nodesToAnalyze.Count); 2648ArrayBuilder<SyntaxNode> filteredNodesToAnalyze) 2667var executableCodeBlockActionsBuilder = ArrayBuilder<ExecutableCodeBlockAnalyzerActions>.GetInstance(); 2826ArrayBuilder<ExecutableCodeBlockAnalyzerActions> builder) 2844ArrayBuilder<SyntaxNode> nodesToAnalyze, 2920ArrayBuilder<IOperation> operationBlocksToAnalyze = ArrayBuilder<IOperation>.GetInstance(); 2936ArrayBuilder<IOperation> operationsToAnalyze = ArrayBuilder<IOperation>.GetInstance();
DiagnosticAnalyzer\AnalyzerDriver.DeclarationAnalysisData.cs (2)
32public readonly ArrayBuilder<SyntaxNode> DescendantNodesToAnalyze = ArrayBuilder<SyntaxNode>.GetInstance();
DiagnosticAnalyzer\AnalyzerExecutor.cs (12)
780var executableNodeActions = ArrayBuilder<TNodeAction>.GetInstance(); 781var syntaxNodeActions = executableNodeActions as ArrayBuilder<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>; 782var operationActions = executableNodeActions as ArrayBuilder<OperationAnalyzerAction>; 930var nodeActionsByKind = PooledDictionary<TLanguageKindEnum, ArrayBuilder<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>>.GetInstance(); 935if (!nodeActionsByKind.TryGetValue(kind, out var actionsForKind)) 937nodeActionsByKind.Add(kind, actionsForKind = ArrayBuilder<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>.GetInstance()); 1029var operationActionsByKind = PooledDictionary<OperationKind, ArrayBuilder<OperationAnalyzerAction>>.GetInstance(); 1034if (!operationActionsByKind.TryGetValue(kind, out var actionsForKind)) 1036operationActionsByKind.Add(kind, actionsForKind = ArrayBuilder<OperationAnalyzerAction>.GetInstance());
DiagnosticAnalyzer\AnalyzerFileReference.cs (4)
588var builder = ArrayBuilder<(string typeName, TExtension analyzer)>.GetInstance(); 656var builder = ArrayBuilder<string>.GetInstance(source.Count);
DiagnosticAnalyzer\AnalyzerManager.cs (2)
209ArrayBuilder<SymbolStartAnalyzerAction>? filteredActionsBuilderOpt = null; 217filteredActionsBuilderOpt = ArrayBuilder<SymbolStartAnalyzerAction>.GetInstance();
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (10)
769var builder = ArrayBuilder<(AnalysisScope, ImmutableArray<CompilationEvent>)>.GetInstance(); 815ArrayBuilder<(AnalysisScope, ImmutableArray<CompilationEvent>)> builder, 857var symbolStartAnalyzersBuilder = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(); 858var otherAnalyzersBuilder = ArrayBuilder<DiagnosticAnalyzer>.GetInstance(); 882ArrayBuilder<(AnalysisScope, ImmutableArray<CompilationEvent>)> builder, 1061var builder = ArrayBuilder<CompilationEvent>.GetInstance();
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.cs (2)
30var builder = ArrayBuilder<DiagnosticDescriptor>.GetInstance(errorCodes.Length);
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (2)
830var builder = ArrayBuilder<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>.GetInstance();
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (5)
82var results = ArrayBuilder<ISymbol>.GetInstance(); 319var builder = new ArrayBuilder<ParameterInfo>(); 660var builder = new ArrayBuilder<TypeInfo>(); 740var builder = new ArrayBuilder<IMethodSymbol>();
Emit\CommonPEModuleBuilder.cs (7)
174protected abstract void AddEmbeddedResourcesFromAddedModules(ArrayBuilder<Cci.ManagedResource> builder, DiagnosticBag diagnostics); 460var result = ArrayBuilder<Cci.AssemblyReferenceAlias>.GetInstance(); 514var builder = ArrayBuilder<Cci.ManagedResource>.GetInstance(); 830var builder = ArrayBuilder<ISymbolInternal>.GetInstance();
Emit\EditAndContinue\DefinitionMap.cs (6)
467var builder = ArrayBuilder<DebugId>.GetInstance(lambda.Parameters.Length); 550var lambdasBuilder = ArrayBuilder<(DebugId id, IMethodSymbolInternal symbol)>.GetInstance(); 650var builder = ArrayBuilder<string>.GetInstance();
Emit\EditAndContinue\DeltaMetadataWriter.cs (31)
38private readonly IReadOnlyDictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>> _deletedMethodDefs; 56private readonly ArrayBuilder<int> _customAttributeRowIds; 78IReadOnlyDictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>> deletedMethodDefs, 118_customAttributeRowIds = ArrayBuilder<int>.GetInstance(); 277public void GetUpdatedMethodTokens(ArrayBuilder<MethodDefinitionHandle> methods) 292public void GetChangedTypeTokens(ArrayBuilder<TypeDefinitionHandle> types) 495internal static IReadOnlyDictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>> CreateDeletedMethodsDefs(EmitContext context, SymbolChanges changes) 497var result = new Dictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>>(ReferenceEqualityComparer.Instance); 509var deletedMethodDefs = getDeletedMethodDefs(typeDef); 521ArrayBuilder<IMethodDefinition>? getDeletedMethodDefs(ITypeDefinition typeDef) 529var newMethodDefs = ArrayBuilder<IMethodDefinition>.GetInstance(); 657if (_deletedMethodDefs.TryGetValue(typeDef, out var newMethodDefs)) 679var implementingMethods = ArrayBuilder<int>.GetInstance(); 856var encInfos = ArrayBuilder<EncLocalInfo>.GetInstance(); 1074var paramEncMapRows = ArrayBuilder<int>.GetInstance(); 1083private void PopulateEncLogTableRows(ImmutableArray<int> rowCounts, ArrayBuilder<int> paramEncMapRows) 1179private void PopulateEncLogTableParameters(ArrayBuilder<int> paramEncMapRows) 1238private void PopulateEncMapTableRows(ImmutableArray<int> rowCounts, ArrayBuilder<int> paramEncMapRows) 1244var tokens = ArrayBuilder<EntityHandle>.GetInstance(); 1321var debugTokens = ArrayBuilder<EntityHandle>.GetInstance(); 1390ArrayBuilder<EntityHandle> builder, 1398private static void AddReferencedTokens(ArrayBuilder<EntityHandle> tokens, TableIndex tableIndex, int firstRowId, int nTokens) 1406private static void AddDefinitionTokens<T>(ArrayBuilder<EntityHandle> tokens, TableIndex tableIndex, DefinitionIndex<T> index) 1415private static void AddRowNumberTokens(ArrayBuilder<EntityHandle> tokens, TableIndex tableIndex, ArrayBuilder<int> rowNumbers)
Emit\EditAndContinue\EncVariableSlotAllocator.cs (1)
110public override void AddPreviousLocals(ArrayBuilder<Cci.ILocalDefinition> builder)
Emit\EditAndContinue\SymbolChanges.cs (6)
357var updatedMethodsBuilder = new Dictionary<INamedTypeSymbolInternal, ArrayBuilder<(IMethodSymbolInternal oldMethod, IMethodSymbolInternal newMethod)>>(); 359var lazyDeletedMembersBuilder = (Dictionary<ISymbolInternal, ArrayBuilder<ISymbolInternal>>?)null; 387if (!lazyDeletedMembersBuilder.TryGetValue(newContainingType, out var deletedMembersPerType)) 389deletedMembersPerType = ArrayBuilder<ISymbolInternal>.GetInstance(); 431if (!updatedMethodsBuilder.TryGetValue(newMember.ContainingType, out var updatedMethodsPerType)) 433updatedMethodsPerType = ArrayBuilder<(IMethodSymbolInternal, IMethodSymbolInternal)>.GetInstance();
Emit\EditAndContinue\SymbolMatcher.cs (2)
199var memberBuilder = ArrayBuilder<ISymbolInternal>.GetInstance();
Emit\EditAndContinueMethodDebugInformation.cs (8)
99var mapBuilder = ArrayBuilder<LocalSlotDebugInfo>.GetInstance(); 212var closuresBuilder = ArrayBuilder<ClosureDebugInfo>.GetInstance(); 213var lambdasBuilder = ArrayBuilder<LambdaDebugInfo>.GetInstance(); 316var mapBuilder = ArrayBuilder<StateMachineStateDebugInfo>.GetInstance();
Emit\NoPia\CommonEmbeddedMember.cs (2)
65var builder = ArrayBuilder<TAttributeData>.GetInstance();
Emit\NoPia\CommonEmbeddedParameter.cs (2)
82var builder = ArrayBuilder<TAttributeData>.GetInstance();
Emit\NoPia\CommonEmbeddedType.cs (10)
93var builder = ArrayBuilder<TAttributeData>.GetInstance(); 249var builder = ArrayBuilder<Cci.IEventDefinition>.GetInstance(); 278var builder = ArrayBuilder<Cci.IFieldDefinition>.GetInstance(); 447var builder = ArrayBuilder<Cci.IMethodDefinition>.GetInstance(); 497var builder = ArrayBuilder<Cci.IPropertyDefinition>.GetInstance();
Emit\NoPia\EmbeddedTypesManager.cs (2)
95var builder = ArrayBuilder<TEmbeddedType>.GetInstance();
FileSystem\PathUtilities.cs (2)
857var resolvedParts = ArrayBuilder<string>.GetInstance();
InternalUtilities\EnumerableExtensions.cs (22)
361var builder = ArrayBuilder<TResult>.GetInstance(); 372var builder = ArrayBuilder<TResult>.GetInstance(); 421var builder = ArrayBuilder<TResult>.GetInstance(); 433var builder = ArrayBuilder<TResult>.GetInstance(); 446var builder = ArrayBuilder<TResult>.GetInstance(source.Count); 459var builder = ArrayBuilder<TResult>.GetInstance(source.Count); 471var builder = ArrayBuilder<TResult>.GetInstance(); 483var builder = ArrayBuilder<TResult>.GetInstance(); 498var builder = ArrayBuilder<TResult>.GetInstance(); 513var builder = ArrayBuilder<TResult>.GetInstance(); 525var builder = ArrayBuilder<TResult>.GetInstance();
InternalUtilities\EnumField.cs (1)
39internal static EnumField FindValue(ArrayBuilder<EnumField> sortedFields, ulong value)
InternalUtilities\FileLockCheck.cs (2)
201var lockInfos = ArrayBuilder<(int, string)>.GetInstance((int)pnProcInfo);
InternalUtilities\OneOrMany.cs (1)
98public void AddRangeTo(ArrayBuilder<T> builder)
InternalUtilities\SetWithInsertionOrder.cs (1)
21private ArrayBuilder<T>? _elements = null;
MetadataReader\MetadataDecoder.cs (17)
266var builder = ArrayBuilder<int>.GetInstance(countOfSizes); 299ArrayBuilder<int> builder = countOfLowerBounds != countOfDimensions ? ArrayBuilder<int>.GetInstance(countOfLowerBounds, 0) : null; 310builder = ArrayBuilder<int>.GetInstance(countOfLowerBounds, 0); 402var argumentsBuilder = ArrayBuilder<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>>.GetInstance(argumentCount); 403var argumentRefersToNoPiaLocalTypeBuilder = ArrayBuilder<bool>.GetInstance(argumentCount); 735ArrayBuilder<ModifierInfo<TypeSymbol>> modifiers = null; 760modifiers = ArrayBuilder<ModifierInfo<TypeSymbol>>.GetInstance(); 864var locals = ArrayBuilder<LocalInfo<TypeSymbol>>.GetInstance(localCount); 865var offsets = ArrayBuilder<int>.GetInstance(localCount); 1901ArrayBuilder<MethodSymbol> resultBuilder = ArrayBuilder<MethodSymbol>.GetInstance();
MetadataReader\MetadataHelpers.cs (11)
136ArrayBuilder<string> nestedTypesBuilder = null; 139ArrayBuilder<int> arrayRanksBuilder = null; 279private static void HandleDecodedTypeName(string decodedTypeName, bool decodingTopLevelType, ref string topLevelType, ref ArrayBuilder<string> nestedTypesBuilder) 292nestedTypesBuilder = ArrayBuilder<string>.GetInstance(); 328var typeBuilder = ArrayBuilder<AssemblyQualifiedTypeName>.GetInstance(); 412private void DecodeArrayShape(StringBuilder typeNameBuilder, ref ArrayBuilder<int> arrayRanksBuilder) 433arrayRanksBuilder = ArrayBuilder<int>.GetInstance(); 628var result = ArrayBuilder<T>.GetInstance(dots + 1); 979internal static void CheckAssemblyOrModuleName(string name, CommonMessageProvider messageProvider, int code, ArrayBuilder<Diagnostic> builder)
MetadataReader\MetadataReaderExtensions.cs (2)
64var result = ArrayBuilder<AssemblyIdentity>.GetInstance(reader.AssemblyReferences.Count);
MetadataReader\PEAssembly.cs (4)
67var refCounts = ArrayBuilder<int>.GetInstance(modules.Length); 69var refs = ArrayBuilder<AssemblyIdentity>.GetInstance(totalRefCount);
MetadataReader\PEModule.cs (27)
381var builder = ArrayBuilder<string>.GetInstance(); 673Dictionary<string, ArrayBuilder<TypeDefinitionHandle>> namespaces = new Dictionary<string, ArrayBuilder<TypeDefinitionHandle>>(); 678var result = new ArrayBuilder<IGrouping<string, TypeDefinitionHandle>>(namespaces.Count); 739private void GetTypeNamespaceNamesOrThrow(Dictionary<string, ArrayBuilder<TypeDefinitionHandle>> namespaces) 742var namespaceHandles = new Dictionary<NamespaceDefinitionHandle, ArrayBuilder<TypeDefinitionHandle>>(NamespaceHandleEqualityComparer.Singleton); 748ArrayBuilder<TypeDefinitionHandle> builder; 764ArrayBuilder<TypeDefinitionHandle> builder; 819private void GetForwardedTypeNamespaceNamesOrThrow(Dictionary<string, ArrayBuilder<TypeDefinitionHandle>> namespaces) 1631ArrayBuilder<string> result = ExtractStringValuesFromAttributes(attrInfos); 1638ArrayBuilder<string> result = ExtractStringValuesFromAttributes(attrInfos); 1653var result = ArrayBuilder<string>.GetInstance(attrInfos.Count); 1693var whenTrue = ArrayBuilder<string>.GetInstance(attrInfos.Count); 1694var whenFalse = ArrayBuilder<string>.GetInstance(attrInfos.Count); 1704var whenResult = extracted.Sense ? whenTrue : whenFalse; 1711var whenResult = extracted2.Sense ? whenTrue : whenFalse; 1726private ArrayBuilder<string> ExtractStringValuesFromAttributes(List<AttributeInfo> attrInfos) 1733var result = ArrayBuilder<string>.GetInstance(attrInfos.Count); 2428var boolArrayBuilder = ArrayBuilder<bool>.GetInstance((int)arrayLen); 2457var byteArrayBuilder = ArrayBuilder<byte>.GetInstance((int)arrayLen);
MetadataReader\TypeNameDecoder.cs (4)
224var typeArgumentsBuilder = ArrayBuilder<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>>.GetInstance(count); 225var refersToNoPiaBuilder = ArrayBuilder<bool>.GetInstance(count);
MetadataReference\AssemblyIdentity.cs (2)
441var result = ArrayBuilder<byte>.GetInstance(PublicKeyTokenSize);
MetadataReference\AssemblyIdentity.DisplayName.cs (2)
708var bytes = ArrayBuilder<byte>.GetInstance(length);
NativePdbWriter\PdbWriter.cs (4)
372ArrayBuilder<string> nestedNamesReversed; 377nestedNamesReversed = ArrayBuilder<string>.GetInstance(); 467var scopeStack = ArrayBuilder<LocalScope>.GetInstance();
Operations\ControlFlowBranch.cs (6)
82private static ArrayBuilder<ControlFlowRegion> CollectRegions(int destinationOrdinal, ControlFlowRegion source) 84var builder = ArrayBuilder<ControlFlowRegion>.GetInstance(); 115ArrayBuilder<ControlFlowRegion> builder = CollectRegions(Source.Ordinal, Destination.EnclosingRegion); 137ArrayBuilder<ControlFlowRegion>? builder = null; 146builder = ArrayBuilder<ControlFlowRegion>.GetInstance();
Operations\ControlFlowGraphBuilder.BasicBlockBuilder.cs (7)
19private ArrayBuilder<IOperation>? _statements; 47public ArrayBuilder<IOperation>? StatementsOpt => _statements; 55_statements = ArrayBuilder<IOperation>.GetInstance(); 201public void GetPredecessors(ArrayBuilder<BasicBlockBuilder> builder) 227public ImmutableArray<ControlFlowBranch> ConvertPredecessorsToBranches(ArrayBuilder<BasicBlock> blocks) 238var branches = ArrayBuilder<ControlFlowBranch>.GetInstance(_predecessors?.Count ?? 2);
Operations\ControlFlowGraphBuilder.ConditionalAccessOperationTracker.cs (2)
21public readonly ArrayBuilder<IOperation>? Operations; 28public ConditionalAccessOperationTracker(ArrayBuilder<IOperation> operations, BasicBlockBuilder whenNull)
Operations\ControlFlowGraphBuilder.cs (78)
33private readonly ArrayBuilder<BasicBlockBuilder> _blocks; 41private readonly ArrayBuilder<(EvalStackFrame? frameOpt, IOperation? operationOpt)> _evalStack; 63private ControlFlowGraphBuilder(Compilation compilation, CaptureIdDispenser? captureIdDispenser, ArrayBuilder<BasicBlockBuilder> blocks) 70_evalStack = ArrayBuilder<(EvalStackFrame? frameOpt, IOperation? operationOpt)>.GetInstance(); 113var blocks = ArrayBuilder<BasicBlockBuilder>.GetInstance(); 149var localFunctions = ArrayBuilder<IMethodSymbol>.GetInstance(); 172private static ImmutableArray<BasicBlock> ToImmutableBlocks(ArrayBuilder<BasicBlockBuilder> blockBuilders) 174var builder = ArrayBuilder<BasicBlock>.GetInstance(blockBuilders.Count); 223private static void MarkReachableBlocks(ArrayBuilder<BasicBlockBuilder> blocks) 240ArrayBuilder<BasicBlockBuilder> blocks, 243ArrayBuilder<BasicBlockBuilder>? outOfRangeBlocksToVisit, 249var toVisit = ArrayBuilder<BasicBlockBuilder>.GetInstance(); 494private static void Pack(ArrayBuilder<BasicBlockBuilder> blocks, RegionBuilder root, PooledDictionary<BasicBlockBuilder, RegionBuilder> regionMap) 511private static bool PackRegions(RegionBuilder root, ArrayBuilder<BasicBlockBuilder> blocks, PooledDictionary<BasicBlockBuilder, RegionBuilder> regionMap) 614private static void MergeSubRegionAndFree(RegionBuilder subRegion, ArrayBuilder<BasicBlockBuilder> blocks, PooledDictionary<BasicBlockBuilder, RegionBuilder> regionMap, bool canHaveEmptyRegion = false) 670private static bool PackBlocks(ArrayBuilder<BasicBlockBuilder> blocks, PooledDictionary<BasicBlockBuilder, RegionBuilder> regionMap) 672ArrayBuilder<RegionBuilder>? fromCurrent = null; 673ArrayBuilder<RegionBuilder>? fromDestination = null; 674ArrayBuilder<RegionBuilder>? fromPredecessor = null; 675ArrayBuilder<BasicBlockBuilder>? predecessorsBuilder = null; 893predecessorsBuilder = ArrayBuilder<BasicBlockBuilder>.GetInstance(); 1101bool checkBranchesFromPredecessors(ArrayBuilder<BasicBlockBuilder> predecessors, RegionBuilder currentRegion, RegionBuilder? destinationRegionOpt) 1148void collectAncestorsAndSelf([DisallowNull] RegionBuilder? from, [NotNull] ref ArrayBuilder<RegionBuilder>? builder) 1152builder = ArrayBuilder<RegionBuilder>.GetInstance(); 1170int getIndexOfLastLeftRegion(ArrayBuilder<RegionBuilder> from, ArrayBuilder<RegionBuilder> to) 1186private static void CheckUnresolvedBranches(ArrayBuilder<BasicBlockBuilder> blocks, PooledDictionary<ILabelSymbol, BasicBlockBuilder>? labeledBlocks) 2007var builder = ArrayBuilder<T>.GetInstance(numElements); 2047ArrayBuilder<IInterpolatedStringHandlerCreationOperation>? interpolatedStringBuilder = null; 2055interpolatedStringBuilder ??= ArrayBuilder<IInterpolatedStringHandlerCreationOperation>.GetInstance(); 2204var stack = ArrayBuilder<(IBinaryOperation, EvalStackFrame)>.GetInstance(); 2794var stack = ArrayBuilder<(IOperation? condition, BasicBlockBuilder dest, bool jumpIfTrue)>.GetInstance(); 3369var operations = ArrayBuilder<IOperation>.GetInstance(); 3741var predecessors = ArrayBuilder<BasicBlockBuilder>.GetInstance(); 3969var resourceQueue = ArrayBuilder<(IVariableDeclarationOperation, IVariableDeclaratorOperation)>.GetInstance(declarationGroup.Declarations.Length); 4008void processQueue(ArrayBuilder<(IVariableDeclarationOperation, IVariableDeclaratorOperation)>? resourceQueueOpt) 4030void processResource(IOperation resource, ArrayBuilder<(IVariableDeclarationOperation, IVariableDeclaratorOperation)>? resourceQueueOpt) 4793var builder = ArrayBuilder<IOperation>.GetInstance(--parametersCount, fillWithValue: null!); 4806var builder = ArrayBuilder<IArgumentOperation>.GetInstance(parametersCount, fillWithValue: null!); 6386var initializerBuilder = ArrayBuilder<IOperation>.GetInstance(operation.Initializers.Length); 6519var builder = ArrayBuilder<IOperation>.GetInstance(initializer.ElementValues.Length); 6697var elementBuilder = ArrayBuilder<IOperation>.GetInstance(numElements); 6849var appendCalls = ArrayBuilder<IInterpolatedStringAppendOperation>.GetInstance(); 6892static void collectAppendCalls(IInterpolatedStringHandlerCreationOperation creation, ArrayBuilder<IInterpolatedStringAppendOperation> appendCalls) 6901var stack = ArrayBuilder<IInterpolatedStringAdditionOperation>.GetInstance(); 6933static void appendStringCalls(IInterpolatedStringOperation interpolatedString, ArrayBuilder<IInterpolatedStringAppendOperation> appendCalls) 6941static void pushLeftNodes(IInterpolatedStringAdditionOperation addition, ArrayBuilder<IInterpolatedStringAdditionOperation> stack) 7045var partsBuilder = ArrayBuilder<IInterpolatedStringContentOperation>.GetInstance(operation.Parts.Length); 7247var builder = ArrayBuilder<IArgumentOperation>.GetInstance(propertySymbol.Parameters.Length); 7445var children = ArrayBuilder<IOperation>.GetInstance(); 7574var stack = ArrayBuilder<IBinaryPatternOperation>.GetInstance(); 7818ArrayBuilder<IOperation> statementsBuilder = ArrayBuilder<IOperation>.GetInstance(statements.Length); 7819ArrayBuilder<IOperation>? localFunctionsBuilder = null; 7825(localFunctionsBuilder ??= ArrayBuilder<IOperation>.GetInstance()).Add(statement); 7976var initializerBuilder = ArrayBuilder<IOperation>.GetInstance(initializers.Length);
Operations\ControlFlowGraphBuilder.RegionBuilder.cs (15)
22public ArrayBuilder<RegionBuilder>? Regions = null; 24public ArrayBuilder<(IMethodSymbol, ILocalFunctionOperation)>? LocalFunctions = null; 25public ArrayBuilder<CaptureId>? CaptureIds = null; 70CaptureIds = ArrayBuilder<CaptureId>.GetInstance(); 76public void AddCaptureIds(ArrayBuilder<CaptureId>? others) 87CaptureIds = ArrayBuilder<CaptureId>.GetInstance(); 102LocalFunctions = ArrayBuilder<(IMethodSymbol, ILocalFunctionOperation)>.GetInstance(); 108public void AddRange(ArrayBuilder<(IMethodSymbol, ILocalFunctionOperation)>? others) 121LocalFunctions = ArrayBuilder<(IMethodSymbol, ILocalFunctionOperation)>.GetInstance(); 132Regions = ArrayBuilder<RegionBuilder>.GetInstance(); 201public void ReplaceRegion(RegionBuilder toReplace, ArrayBuilder<RegionBuilder> replaceWith) 296public ControlFlowRegion ToImmutableRegionAndFree(ArrayBuilder<BasicBlockBuilder> blocks, 297ArrayBuilder<IMethodSymbol> localFunctions, 321var builder = ArrayBuilder<ControlFlowRegion>.GetInstance(Regions.Count);
Operations\IOperation.OperationList.cs (2)
47var builder = ArrayBuilder<IOperation>.GetInstance(Count);
Operations\IOperation.OperationList.Reversed.cs (4)
50var builder = ArrayBuilder<IOperation>.GetInstance(Count); 60var builder = ArrayBuilder<IOperation>.GetInstance(input.Length);
Operations\OperationExtensions.cs (7)
96var stack = ArrayBuilder<IOperation.OperationList.Enumerator>.GetInstance(); 135var arrayBuilder = ArrayBuilder<ILocalSymbol>.GetInstance(); 155var arrayBuilder = ArrayBuilder<ILocalSymbol>.GetInstance(); 160private static void GetDeclaredVariables(this IVariableDeclarationOperation declaration, ArrayBuilder<ILocalSymbol> arrayBuilder)
PEWriter\CustomDebugInfoWriter.cs (8)
164private static ArrayBuilder<T> GetLocalInfoToSerialize<T>( 169ArrayBuilder<T> builder = null; 180builder = ArrayBuilder<T>.GetInstance(); 193builder = ArrayBuilder<T>.GetInstance(); 225var dynamicLocals = GetLocalInfoToSerialize( 247var locals = GetLocalInfoToSerialize( 276var usingCounts = ArrayBuilder<int>.GetInstance();
PEWriter\ExtendedPEBuilder.cs (2)
57var builder = ArrayBuilder<Section>.GetInstance(baseSections.Length + 1);
PEWriter\ITypeReferenceExtensions.cs (1)
15internal static void GetConsolidatedTypeArguments(this ITypeReference typeReference, ArrayBuilder<ITypeReference> consolidatedTypeArguments, EmitContext context)
PEWriter\MetadataWriter.cs (5)
600ArrayBuilder<IParameterDefinition> builder = null; 605builder = ArrayBuilder<IParameterDefinition>.GetInstance(parameters.Length + 1); 629builder = ArrayBuilder<IParameterDefinition>.GetInstance(parameters.Length); 3911var consolidatedTypeArguments = ArrayBuilder<ITypeReference>.GetInstance();
PEWriter\MetadataWriter.PortablePdb.cs (2)
515var builder = ArrayBuilder<byte>.GetInstance();
PEWriter\TypeNameSerializer.cs (4)
94ArrayBuilder<ITypeReference> consolidatedTypeArguments = ArrayBuilder<ITypeReference>.GetInstance(); 275var namesReversed = ArrayBuilder<string>.GetInstance();
ReferenceManager\AssemblyDataForAssemblyBeingBuilt.cs (2)
40var refs = ArrayBuilder<AssemblyIdentity>.GetInstance(builderSize);
ReferenceManager\CommonReferenceManager.Binding.cs (21)
113var referenceBindings = ArrayBuilder<AssemblyReferenceBinding[]>.GetInstance(); 217[In, Out] ArrayBuilder<AssemblyReferenceBinding[]> referenceBindings, 232var implicitAssemblies = ArrayBuilder<AssemblyData>.GetInstance(); 237var metadataReferencesBuilder = ArrayBuilder<MetadataReference>.GetInstance(); 242var referenceBindingsToProcess = ArrayBuilder<(MetadataReference, ArraySegment<AssemblyReferenceBinding>)>.GetInstance(); 393ArrayBuilder<AssemblyReferenceBinding[]> referenceBindings, 395[Out] ArrayBuilder<(MetadataReference, ArraySegment<AssemblyReferenceBinding>)> result) 445var result = ArrayBuilder<int>.GetInstance(modules.Length); 465var result = ArrayBuilder<ResolvedReference>.GetInstance(references.Length); 475private static void UpdateBindingsOfAssemblyBeingBuilt(ArrayBuilder<AssemblyReferenceBinding[]> referenceBindings, int explicitAssemblyCount, ArrayBuilder<AssemblyData> implicitAssemblies) 480var bindingsOfAssemblyBeingBuilt = ArrayBuilder<AssemblyReferenceBinding>.GetInstance(referenceBindingsOfAssemblyBeingBuilt.Length + implicitAssemblies.Count); 995ArrayBuilder<int>? corLibraryCandidates = null; 1019corLibraryCandidates = ArrayBuilder<int>.GetInstance();
ReferenceManager\CommonReferenceManager.Resolution.cs (12)
237ArrayBuilder<MetadataReference>? uniqueDirectiveReferences = (referenceDirectiveLocations != null) ? ArrayBuilder<MetadataReference>.GetInstance() : null; 238var assembliesBuilder = ArrayBuilder<AssemblyData>.GetInstance(); 239ArrayBuilder<PEModule>? lazyModulesBuilder = null; 636private static void AddAssembly(AssemblyData data, int referenceIndex, ResolvedReference[] referenceMap, ArrayBuilder<AssemblyData> assemblies) 646private static void AddModule(PEModule module, int referenceIndex, ResolvedReference[] referenceMap, [NotNull] ref ArrayBuilder<PEModule>? modules) 650modules = ArrayBuilder<PEModule>.GetInstance(); 795ArrayBuilder<MetadataReference> referencesBuilder = ArrayBuilder<MetadataReference>.GetInstance(); 796ArrayBuilder<Location>? referenceDirectiveLocationsBuilder = null; 829referenceDirectiveLocationsBuilder = ArrayBuilder<Location>.GetInstance();
ReferenceManager\CommonReferenceManager.State.cs (5)
474var aliasesOfReferencedAssembliesBuilder = ArrayBuilder<ImmutableArray<string>>.GetInstance(referenceMap.Length - referencedModuleCount); 616ArrayBuilder<ImmutableArray<string>> aliasesOfReferencedAssembliesBuilder) 618var assemblyIndicesToProcess = ArrayBuilder<int>.GetInstance();
ReferenceManager\Compilation_MetadataCache.cs (1)
48internal void AddRetargetingAssemblySymbolsNoLock<T>(ArrayBuilder<T> result) where T : IAssemblySymbolInternal
ReferenceManager\MergedAliases.cs (12)
13public ArrayBuilder<string>? AliasesOpt; 14public ArrayBuilder<string>? RecursiveAliasesOpt; 15public ArrayBuilder<MetadataReference>? MergedReferencesOpt; 36ArrayBuilder<string> aliases; 41RecursiveAliasesOpt = ArrayBuilder<string>.GetInstance(); 52AliasesOpt = ArrayBuilder<string>.GetInstance(); 64(MergedReferencesOpt ??= ArrayBuilder<MetadataReference>.GetInstance()).Add(reference); 67internal static void Merge(ArrayBuilder<string> aliases, ImmutableArray<string> newAliases) 84var result = ArrayBuilder<string>.GetInstance(aliasesOpt.Length); 90private static void AddNonIncluded(ArrayBuilder<string> builder, string item) 98private static void AddNonIncluded(ArrayBuilder<string> builder, ImmutableArray<string> items)
SourceFileResolver.cs (2)
62var pathMapBuilder = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(pathMap.Length);
SourceGeneration\AdditionalSourcesCollection.cs (2)
18private readonly ArrayBuilder<GeneratedSourceText> _sourcesAdded; 32_sourcesAdded = ArrayBuilder<GeneratedSourceText>.GetInstance();
SourceGeneration\GeneratorDriver.cs (20)
73ArrayBuilder<SyntaxTree> trees = ArrayBuilder<SyntaxTree>.GetInstance(); 97var states = ArrayBuilder<GeneratorState>.GetInstance(generators.Length); 194ArrayBuilder<GeneratedSourceResult> sources = ArrayBuilder<GeneratedSourceResult>.GetInstance(generatorState.PostInitTrees.Length + generatorState.GeneratedTrees.Length); 224var stateBuilder = ArrayBuilder<GeneratorState>.GetInstance(state.Generators.Length); 225var constantSourcesBuilder = ArrayBuilder<SyntaxTree>.GetInstance(); 226var syntaxInputNodes = ArrayBuilder<SyntaxInputNode>.GetInstance(); 243var outputBuilder = ArrayBuilder<IIncrementalGeneratorOutputNode>.GetInstance(); 244var inputBuilder = ArrayBuilder<SyntaxInputNode>.GetInstance(); 371var trees = ArrayBuilder<GeneratedSyntaxTree>.GetInstance(generatedSources.Length); 427ArrayBuilder<Diagnostic> filteredDiagnostics = ArrayBuilder<Diagnostic>.GetInstance();
SourceGeneration\GlobalAliases.cs (2)
42var total = ArrayBuilder<(string aliasName, string symbolName)>.GetInstance(aliasesArray.Sum(a => a.AliasAndSymbolNames.Length));
SourceGeneration\IncrementalContexts.cs (6)
27private readonly ArrayBuilder<SyntaxInputNode> _syntaxInputBuilder; 28private readonly ArrayBuilder<IIncrementalGeneratorOutputNode> _outputNodes; 35ArrayBuilder<SyntaxInputNode> syntaxInputBuilder, 36ArrayBuilder<IIncrementalGeneratorOutputNode> outputNodes, 216internal readonly ArrayBuilder<(string, object)> Outputs; 218internal HostOutputProductionContext(ArrayBuilder<(string, object)> outputs, CancellationToken cancellationToken)
SourceGeneration\ISyntaxHelper.cs (6)
20void AddAttributeTargets(SyntaxNode node, ArrayBuilder<SyntaxNode> targets); 32void AddAliases(GreenNode node, ArrayBuilder<(string aliasName, string symbolName)> aliases, bool global); 33void AddAliases(CompilationOptions options, ArrayBuilder<(string aliasName, string symbolName)> aliases); 53public abstract void AddAttributeTargets(SyntaxNode node, ArrayBuilder<SyntaxNode> targets); 57public abstract void AddAliases(GreenNode node, ArrayBuilder<(string aliasName, string symbolName)> aliases, bool global); 58public abstract void AddAliases(CompilationOptions options, ArrayBuilder<(string aliasName, string symbolName)> aliases);
SourceGeneration\Nodes\BatchNode.cs (4)
39var sourceInputsBuilder = newTable.TrackIncrementalSteps ? ArrayBuilder<(IncrementalGeneratorRunStep InputStep, int OutputIndex)>.GetInstance() : null; 97var builder = ArrayBuilder<TInput>.GetInstance(entryCount);
SourceGeneration\Nodes\HostOutputNode.cs (2)
56ArrayBuilder<(string, object)> output = ArrayBuilder<(string, object)>.GetInstance();
SourceGeneration\Nodes\NodeStateTable.cs (14)
160var compacted = ArrayBuilder<TableEntry>.GetInstance(nonRemovedCount); 228private readonly ArrayBuilder<TableEntry> _states; 233private readonly ArrayBuilder<IncrementalGeneratorRunStep>? _steps; 256_states = ArrayBuilder<TableEntry>.GetInstance(tableCapacity ?? previous.GetTotalEntryItemCount()); 262_steps = ArrayBuilder<IncrementalGeneratorRunStep>.GetInstance(); 485var stepOutputBuilder = ArrayBuilder<(object, IncrementalStepRunReason)>.GetInstance(outputInfo.Count); 641var itemBuilder = ArrayBuilder<T>.GetInstance(); 720private readonly ArrayBuilder<T> _items; 722private ArrayBuilder<EntryState>? _states; 730_items = ArrayBuilder<T>.GetInstance(capacity); 750_states = ArrayBuilder<EntryState>.GetInstance(_requestedCapacity);
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (2)
120ArrayBuilder<SyntaxNode>? results = null; 127(results ??= ArrayBuilder<SyntaxNode>.GetInstance()).Add(node);
SourceGeneration\Nodes\SyntaxValueProvider.cs (2)
19private readonly ArrayBuilder<SyntaxInputNode> _inputNodes; 25ArrayBuilder<SyntaxInputNode> inputNodes,
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (4)
99var result = ArrayBuilder<T>.GetInstance(); 143var result = ArrayBuilder<AttributeData>.GetInstance();
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (11)
16using Aliases = ArrayBuilder<(string aliasName, string symbolName)>; 90var aliases = Aliases.GetInstance(); 117var globalAliases = Aliases.GetInstance(); 168var localAliases = Aliases.GetInstance(); 174var results = ArrayBuilder<SyntaxNode>.GetInstance(); 175var attributeTargets = ArrayBuilder<SyntaxNode>.GetInstance();
SourceGeneration\SyntaxStore.cs (2)
62var syntaxInputBuilders = ArrayBuilder<(SyntaxInputNode node, ISyntaxInputBuilder builder)>.GetInstance(_syntaxInputNodes.Length);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (20)
130var builder = ArrayBuilder<short>.GetInstance(numCounts); 179var builder = ArrayBuilder<StateMachineHoistedLocalScope>.GetInstance(bucketCount); 245var flagsBuilder = ArrayBuilder<bool>.GetInstance(FlagBytesCount); 251var builder = ArrayBuilder<DynamicLocalInfo>.GetInstance(bucketCount); 304var builder = ArrayBuilder<TupleElementNamesInfo>.GetInstance(n); 316var builder = ArrayBuilder<string>.GetInstance(n); 398var externAliasBuilder = ArrayBuilder<string>.GetInstance(); 422var resultBuilder = ArrayBuilder<ImmutableArray<string>>.GetInstance(groupSizes.Length); 423var groupBuilder = ArrayBuilder<string>.GetInstance(); 853var builder = ArrayBuilder<byte>.GetInstance();
src\Dependencies\PooledObjects\ArrayBuilder.cs (27)
17[DebuggerTypeProxy(typeof(ArrayBuilder<>.DebuggerProxy))] 29private readonly ArrayBuilder<T> _builder; 31public DebuggerProxy(ArrayBuilder<T> builder) 56private readonly ObjectPool<ArrayBuilder<T>>? _pool; 67private ArrayBuilder(ObjectPool<ArrayBuilder<T>> pool) 374var tmp = ArrayBuilder<U>.GetInstance(Count); 459private static readonly ObjectPool<ArrayBuilder<T>> s_poolInstance = CreatePool(); 460public static ArrayBuilder<T> GetInstance() 462var builder = s_poolInstance.Allocate(); 467public static ArrayBuilder<T> GetInstance(int capacity) 469var builder = GetInstance(); 474public static ArrayBuilder<T> GetInstance(int capacity, T fillWithValue) 476var builder = GetInstance(); 487public static ObjectPool<ArrayBuilder<T>> CreatePool() 492public static ObjectPool<ArrayBuilder<T>> CreatePool(int size) 494ObjectPool<ArrayBuilder<T>>? pool = null; 495pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool!), size); 534var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 539if (!accumulator.TryGetValue(key, out var bucket)) 541bucket = ArrayBuilder<T>.GetInstance(); 559public void AddRange(ArrayBuilder<T> items) 564public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 572public void AddRange<U>(ArrayBuilder<U> items) where U : T 577public void AddRange<U>(ArrayBuilder<U> items, int start, int length) where U : T 708var result = ArrayBuilder<S>.GetInstance(Count);
src\Dependencies\PooledObjects\ArrayBuilder.Enumerator.cs (2)
14private readonly ArrayBuilder<T> _builder; 17public Enumerator(ArrayBuilder<T> builder)
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (12)
16private ArrayBuilder<SymbolDisplayPart> _builder = null!; 31protected ArrayBuilder<SymbolDisplayPart> Builder => _builder; 70ArrayBuilder<SymbolDisplayPart> builder, 215var allFieldsAndValues = ArrayBuilder<EnumField>.GetInstance(); 218var usedFieldsAndValues = ArrayBuilder<EnumField>.GetInstance(); 232ArrayBuilder<EnumField> allFieldsAndValues, 233ArrayBuilder<EnumField> usedFieldsAndValues, 313ArrayBuilder<EnumField> enumFields) 339var enumFields = ArrayBuilder<EnumField>.GetInstance();
SymbolDisplay\SymbolDisplayExtensions.cs (1)
56internal static string ToDisplayString(this ArrayBuilder<SymbolDisplayPart> parts)
Symbols\Attributes\AttributeUsageInfo.cs (2)
153var builder = ArrayBuilder<string>.GetInstance();
Symbols\Attributes\IMemberNotNullAttributeTarget.cs (2)
16void AddNotNullMember(ArrayBuilder<string> memberNames); 22void AddNotNullWhenMember(bool sense, ArrayBuilder<string> memberNames);
Syntax\GreenNode.cs (3)
634var stack = ArrayBuilder<(GreenNode node, bool leading, bool trailing)>.GetInstance(); 645ArrayBuilder<(GreenNode node, bool leading, bool trailing)> stack)
Syntax\GreenNode.NodeEnumerable.cs (2)
24private readonly ArrayBuilder<Syntax.InternalSyntax.ChildSyntaxList.Enumerator> _stack; 32_stack = ArrayBuilder<Syntax.InternalSyntax.ChildSyntaxList.Enumerator>.GetInstance();
Syntax\GreenNodeExtensions.cs (8)
16var newAnnotations = ArrayBuilder<SyntaxAnnotation>.GetInstance(); 53var newAnnotations = ArrayBuilder<SyntaxAnnotation>.GetInstance(); 84var removalAnnotations = ArrayBuilder<SyntaxAnnotation>.GetInstance(); 93var newAnnotations = ArrayBuilder<SyntaxAnnotation>.GetInstance();
Syntax\LineDirectiveMap.cs (2)
141var entries = ArrayBuilder<LineMappingEntry>.GetInstance(directives.Count + 1);
Syntax\SyntaxNode.cs (2)
456var stack = PooledObjects.ArrayBuilder<GreenNode?>.GetInstance();
Syntax\SyntaxNode.Iterators.cs (6)
197private readonly ArrayBuilder<Which>? _discriminatorStack; 205_discriminatorStack = ArrayBuilder<Which>.GetInstance(); 289private readonly ArrayBuilder<SyntaxNodeOrToken>? _tokenStack; 290private readonly ArrayBuilder<Which>? _discriminatorStack; 298_tokenStack = ArrayBuilder<SyntaxNodeOrToken>.GetInstance(); 299_discriminatorStack = ArrayBuilder<Which>.GetInstance();
Text\CompositeText.cs (10)
94var newSegments = ArrayBuilder<SourceText>.GetInstance(); 169internal static void AddSegments(ArrayBuilder<SourceText> segments, SourceText text) 182internal static SourceText ToSourceText(ArrayBuilder<SourceText> segments, SourceText original, bool adjustSegments) 206private static void RemoveSplitLineBreaksAndEmptySegments(ArrayBuilder<SourceText> segments) 246private static void ReduceSegmentCountIfNecessary(ArrayBuilder<SourceText> segments) 267private static int GetMinimalSegmentSizeToUseForCombining(ArrayBuilder<SourceText> segments) 287private static int GetSegmentCountIfCombined(ArrayBuilder<SourceText> segments, int segmentSize) 322private static void CombineSegments(ArrayBuilder<SourceText> segments, int segmentSize) 394private static void TrimInaccessibleText(ArrayBuilder<SourceText> segments)
Text\LargeText.cs (2)
96var chunks = ArrayBuilder<char[]>.GetInstance(1 + maxCharRemainingGuess / ChunkSize);
Text\LargeTextWriter.cs (2)
16private readonly ArrayBuilder<char[]> _chunks; 26_chunks = ArrayBuilder<char[]>.GetInstance(1 + length / LargeText.ChunkSize);
Text\SourceText.cs (4)
760var segments = ArrayBuilder<SourceText>.GetInstance(); 761var changeRanges = ArrayBuilder<TextChangeRange>.GetInstance();
Text\TextChangeRangeExtensions.cs (5)
130var builder = ArrayBuilder<TextChangeRange>.GetInstance(); 370static void addAndAdjustOldDelta(ArrayBuilder<TextChangeRange> builder, ref int oldDelta, TextChangeRange oldChange) 377static void adjustAndAddNewChange(ArrayBuilder<TextChangeRange> builder, int oldDelta, UnadjustedNewChange newChange) 383static void add(ArrayBuilder<TextChangeRange> builder, TextChangeRange change)
Microsoft.CodeAnalysis.CSharp (797)
Binder\Binder.CapturedParametersFinder.cs (1)
41var captured = ArrayBuilder<ParameterSymbol>.GetInstance(primaryConstructor.Parameters.Length);
Binder\Binder.cs (1)
848var binders = ArrayBuilder<Binder>.GetInstance();
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
271var members = ArrayBuilder<Symbol>.GetInstance();
Binder\Binder.ValueChecks.cs (13)
392var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(accessorForDefaultArguments.ParameterCount); 1934var arguments = ArrayBuilder<BoundExpression>.GetInstance(); 1991var escapeValues = ArrayBuilder<EscapeValue>.GetInstance(); 2060var argsAndParamsAll = ArrayBuilder<EscapeValue>.GetInstance(); 2148var escapeArguments = ArrayBuilder<EscapeArgument>.GetInstance(); 2220var argsAndParamsAll = ArrayBuilder<EscapeValue>.GetInstance(); 2597var escapeArguments = ArrayBuilder<EscapeArgument>.GetInstance(); 2673var escapeArguments = ArrayBuilder<EscapeArgument>.GetInstance(); 2801var escapeArguments = ArrayBuilder<EscapeArgument>.GetInstance(); 2880var mixableArguments = ArrayBuilder<MixableDestination>.GetInstance(); 2881var escapeValues = ArrayBuilder<EscapeValue>.GetInstance(); 4642var escapeValues = ArrayBuilder<EscapeValue>.GetInstance(); 5606var arguments = ArrayBuilder<BoundExpression>.GetInstance();
Binder\Binder_Attributes.cs (3)
380var constructorArgumentSourceIndices = ArrayBuilder<int>.GetInstance(lengthAfterRewriting); 768var builder = ArrayBuilder<TypedConstant>.GetInstance(numArguments); 879var builder = ArrayBuilder<TypedConstant>.GetInstance(elements.Length);
Binder\Binder_Constraints.cs (4)
54var results = ArrayBuilder<TypeParameterConstraintClause?>.GetInstance(n, fillWithValue: null); 55var syntaxNodes = ArrayBuilder<ArrayBuilder<TypeConstraintSyntax>?>.GetInstance(n, fillWithValue: null); 366var builder = ArrayBuilder<TypeParameterConstraintClause>.GetInstance(typeParameterList.Parameters.Count); 412var constraintTypeBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance();
Binder\Binder_Conversions.cs (7)
879var builder = ArrayBuilder<BoundNode>.GetInstance(elements.Length); 1452var resultBuilder = ArrayBuilder<MethodSymbol>.GetInstance(finalApplicableCandidates.Length); 1718var builder = ArrayBuilder<BoundNode>.GetInstance(node.Elements.Length); 1867var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 1972var builder = ArrayBuilder<BoundSwitchExpressionArm>.GetInstance(source.SwitchArms.Length); 2461var locationBuilder = ArrayBuilder<Location?>.GetInstance(); 2476var convertedArguments = ArrayBuilder<BoundExpression>.GetInstance(arguments.Length);
Binder\Binder_Crefs.cs (1)
887var typeArgumentsWithAnnotations = ArrayBuilder<TypeWithAnnotations>.GetInstance(arity);
Binder\Binder_Deconstruct.cs (10)
295var nestedConversions = ArrayBuilder<(BoundValuePlaceholder?, BoundExpression?)>.GetInstance(count); 476var typesWithAnnotationsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(leftLength); 477var locationsBuilder = ArrayBuilder<Location?>.GetInstance(leftLength); 549var valuesBuilder = ArrayBuilder<BoundExpression>.GetInstance(count); 550var typesWithAnnotationsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(count); 551var locationsBuilder = ArrayBuilder<Location?>.GetInstance(count); 552var namesBuilder = ArrayBuilder<string?>.GetInstance(count); 632var outVars = ArrayBuilder<OutDeconstructVarPendingInference>.GetInstance(numCheckedVariables); 776var builder = ArrayBuilder<DeconstructionVariable>.GetInstance(component.Arguments.Count); 839var builder = ArrayBuilder<DeconstructionVariable>.GetInstance();
Binder\Binder_Expressions.cs (31)
332var boundArgs = ArrayBuilder<BoundExpression>.GetInstance(sourceTuple.Arguments.Length); 958var builder = ArrayBuilder<BoundExpression>.GetInstance(count); 959var namesBuilder = ArrayBuilder<string>.GetInstance(count); 1014var boundArguments = ArrayBuilder<BoundExpression>.GetInstance(arguments.Count); 1015var elementTypesWithAnnotations = ArrayBuilder<TypeWithAnnotations>.GetInstance(arguments.Count); 1016var elementLocations = ArrayBuilder<Location>.GetInstance(arguments.Count); 1144var builder = ArrayBuilder<bool>.GetInstance(elementNames.Count); 1604var members = ArrayBuilder<Symbol>.GetInstance(); 3567var paramsArgsBuilder = ArrayBuilder<BoundExpression>.GetInstance(); 3762var handlerArgumentIndexesBuilder = ArrayBuilder<int>.GetInstance(handlerParameterIndexes.Length, fillWithValue: BoundInterpolatedStringArgumentPlaceholder.UnspecifiedParameter); 3790var argumentPlaceholdersBuilder = ArrayBuilder<BoundInterpolatedStringArgumentPlaceholder>.GetInstance(handlerArgumentIndexes.Length); 3791var argumentRefKindsBuilder = ArrayBuilder<RefKind>.GetInstance(handlerArgumentIndexes.Length); 4129var exprBuilder = ArrayBuilder<BoundExpression>.GetInstance(); 4478var builder = ArrayBuilder<BoundExpression>.GetInstance(); 5205var builder = ArrayBuilder<BoundNode>.GetInstance(syntax.Elements.Count); 5540var children = ArrayBuilder<BoundExpression>.GetInstance(); 5640var initializers = ArrayBuilder<BoundExpression>.GetInstance(initializerSyntax.Expressions.Count); 6205var initializerBuilder = ArrayBuilder<BoundExpression>.GetInstance(); 6331var exprBuilder = ArrayBuilder<BoundExpression>.GetInstance(); 6845var childNodes = ArrayBuilder<BoundExpression>.GetInstance(); 8129var builder = ArrayBuilder<MethodSymbol>.GetInstance(); 8236var members = ArrayBuilder<Symbol>.GetInstance(); 8484var members = ArrayBuilder<Symbol>.GetInstance(); 9684var properties = ArrayBuilder<PropertySymbol>.GetInstance(); 10044var properties = ArrayBuilder<PropertySymbol>.GetInstance(); 10483var methods = ArrayBuilder<MethodSymbol>.GetInstance(capacity: node.Methods.Length); 10628var methods = ArrayBuilder<MethodSymbol>.GetInstance(capacity: node.Methods.Length); 10693var methods = ArrayBuilder<MethodSymbol>.GetInstance(capacity: methodGroup.Methods.Count); 10772var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 10862var fieldsBuilder = ArrayBuilder<AnonymousTypeField>.GetInstance(parameterTypes.Length + 1); 10884var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance();
Binder\Binder_Initializers.cs (1)
54var boundInitializers = ArrayBuilder<BoundInitializer>.GetInstance();
Binder\Binder_InterpolatedString.cs (12)
40var builder = ArrayBuilder<BoundExpression>.GetInstance(); 375var expressions = ArrayBuilder<BoundExpression>.GetInstance(n + 1); 465var partsArrayBuilder = ArrayBuilder<ImmutableArray<BoundExpression>>.GetInstance(); 610var partsArrayBuilder = ArrayBuilder<ImmutableArray<BoundExpression>>.GetInstance(); 713var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(constructorArgumentLength); 715var refKindsBuilder = ArrayBuilder<RefKind>.GetInstance(constructorArgumentLength); 907var builderAppendCallsArray = ArrayBuilder<ImmutableArray<BoundExpression>>.GetInstance(partsArray.Length); 908var builderAppendCalls = ArrayBuilder<BoundExpression>.GetInstance(firstPartsLength); 909var positionInfoArray = ArrayBuilder<ImmutableArray<(bool IsLiteral, bool HasAlignment, bool HasFormat)>>.GetInstance(partsArray.Length); 910var positionInfo = ArrayBuilder<(bool IsLiteral, bool HasAlignment, bool HasFormat)>.GetInstance(firstPartsLength); 911var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(3); 912var parameterNamesAndLocationsBuilder = ArrayBuilder<(string, Location)?>.GetInstance(3);
Binder\Binder_Invocation.cs (8)
54var builder = ArrayBuilder<MethodSymbol>.GetInstance(); 203var invocations = ArrayBuilder<InvocationExpressionSyntax>.GetInstance(); 525var builder = ArrayBuilder<BoundExpression>.GetInstance(arguments.Arguments.Count); 980var finalCandidates = ArrayBuilder<MemberResolutionResult<TMethodOrPropertySymbol>>.GetInstance(); 1927var constructedMethods = ArrayBuilder<MethodSymbol>.GetInstance(); 1968var parameterListList = ArrayBuilder<ImmutableArray<ParameterSymbol>>.GetInstance(); 1988var parameterListList = ArrayBuilder<ImmutableArray<ParameterSymbol>>.GetInstance(); 2351var methodsBuilder = ArrayBuilder<FunctionPointerMethodSymbol>.GetInstance(1);
Binder\Binder_Lambda.cs (7)
53var namesBuilder = ArrayBuilder<string>.GetInstance(); 122var typesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 123var refKindsBuilder = ArrayBuilder<RefKind>.GetInstance(); 124var scopesBuilder = ArrayBuilder<ScopedKind>.GetInstance(); 125var attributesBuilder = ArrayBuilder<SyntaxList<AttributeListSyntax>>.GetInstance(); 126var defaultValueBuilder = ArrayBuilder<EqualsValueClauseSyntax?>.GetInstance(); 254var discardsBuilder = ArrayBuilder<bool>.GetInstance(parameters.Count);
Binder\Binder_Lookup.cs (2)
462var methods = ArrayBuilder<MethodSymbol>.GetInstance(); 1072var result = ArrayBuilder<NamedTypeSymbol>.GetInstance();
Binder\Binder_Operators.cs (5)
459var syntaxNodes = ArrayBuilder<BinaryExpressionSyntax>.GetInstance(); 767var stack = ArrayBuilder<BoundBinaryOperator>.GetInstance(); 1268var operators = ArrayBuilder<MethodSymbol>.GetInstance(); 1337var builder = ArrayBuilder<MethodSymbol>.GetInstance(); 1430var builder = ArrayBuilder<MethodSymbol>.GetInstance();
Binder\Binder_Patterns.cs (6)
268var builder = ArrayBuilder<BoundPattern>.GetInstance(subpatterns.Count); 981var patternsBuilder = ArrayBuilder<BoundPositionalSubpattern>.GetInstance(positionalClause.Subpatterns.Count); 1375var subPatterns = ArrayBuilder<BoundPositionalSubpattern>.GetInstance(tupleDesignation.Variables.Count); 1465var builder = ArrayBuilder<BoundPropertySubpattern>.GetInstance(node.Subpatterns.Count); 1739var binaryPatternStack = ArrayBuilder<(BinaryPatternSyntax pat, bool permitDesignations)>.GetInstance(); 1753var narrowedTypeCandidates = ArrayBuilder<TypeSymbol>.GetInstance(2);
Binder\Binder_Query.cs (2)
315var arguments = ArrayBuilder<BoundExpression>.GetInstance(); 320var argsToParams = ArrayBuilder<int>.GetInstance();
Binder\Binder_Statements.cs (4)
1134var invalidDimensions = ArrayBuilder<BoundExpression>.GetInstance(); 2539var stack = ArrayBuilder<(Binder, IfStatementSyntax IfStatementSyntax, BoundExpression Condition, BoundStatement Consequence)>.GetInstance(); 2869var statementBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 3218var catchBlocks = ArrayBuilder<BoundCatchBlock>.GetInstance(n);
Binder\Binder_Symbols.cs (3)
681var types = ArrayBuilder<TypeWithAnnotations>.GetInstance(numElements); 682var locations = ArrayBuilder<Location>.GetInstance(numElements); 1340var args = ArrayBuilder<TypeWithAnnotations>.GetInstance(typeArguments.Count);
Binder\Binder_TupleOperators.cs (2)
58var builder = ArrayBuilder<BoundExpression>.GetInstance(length); 236var operatorsBuilder = ArrayBuilder<TupleBinaryOperatorInfo>.GetInstance(length);
Binder\CatchClauseBinder.cs (1)
29var locals = ArrayBuilder<LocalSymbol>.GetInstance();
Binder\DecisionDagBuilder.cs (23)
200var bindingsBuilder = ArrayBuilder<BoundPatternBinding>.GetInstance(); 235var newSequence = ArrayBuilder<Tests>.GetInstance(length); 332var tests = ArrayBuilder<Tests>.GetInstance(4 + patternLength * 2); 398var tests = ArrayBuilder<Tests>.GetInstance(1); 425var tests = ArrayBuilder<Tests>.GetInstance(4); 499var tests = ArrayBuilder<Tests>.GetInstance(2); 524var tests = ArrayBuilder<Tests>.GetInstance(5); 650var binaryPatternStack = ArrayBuilder<BoundBinaryPattern>.GetInstance(); 673var builder = ArrayBuilder<Tests>.GetInstance(2); 711var tests = ArrayBuilder<Tests>.GetInstance(2); 874var rewrittenCases = ArrayBuilder<StateForCase>.GetInstance(casesForRootNode.Count); 1094var whenTrueBuilder = ArrayBuilder<StateForCase>.GetInstance(cases.Count); 1095var whenFalseBuilder = ArrayBuilder<StateForCase>.GetInstance(cases.Count); 1208var builder = ArrayBuilder<StateForCase>.GetInstance(cases.Count); 1824var builder = ArrayBuilder<T>.GetInstance(this.Count - 1); 1880/// <see cref="ArrayBuilder{StateForCase}"/> will be returned to its pool when <see cref="ClearAndFree"/> is 2293var builder = ArrayBuilder<Tests>.GetInstance(seq.Length); 2340var trueBuilder = ArrayBuilder<Tests>.GetInstance(RemainingTests.Length); 2341var falseBuilder = ArrayBuilder<Tests>.GetInstance(RemainingTests.Length); 2354var builder = ArrayBuilder<Tests>.GetInstance(RemainingTests.Length); 2362var builder = ArrayBuilder<Tests>.GetInstance(RemainingTests.Length); 2392var builder = ArrayBuilder<Tests>.GetInstance(2); 2472var builder = ArrayBuilder<Tests>.GetInstance(2);
Binder\DecisionDagBuilder_ListPatterns.cs (1)
23var tests = ArrayBuilder<Tests>.GetInstance(4 + subpatterns.Length * 2);
Binder\ExpressionListVariableBinder.cs (1)
28var builder = ArrayBuilder<LocalSymbol>.GetInstance();
Binder\ExpressionVariableBinder.cs (1)
28var builder = ArrayBuilder<LocalSymbol>.GetInstance();
Binder\ExpressionVariableFinder.cs (3)
323var operands = ArrayBuilder<ExpressionSyntax>.GetInstance(); 348var rightPatternStack = ArrayBuilder<PatternSyntax>.GetInstance(); 368var invocations = ArrayBuilder<InvocationExpressionSyntax>.GetInstance();
Binder\ForEachLoopBinder.cs (4)
77var locals = ArrayBuilder<LocalSymbol>.GetInstance(); 1206var argsBuilder = ArrayBuilder<BoundExpression>.GetInstance(patternDisposeMethod.ParameterCount); 1422var typeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 1915var argsBuilder = ArrayBuilder<BoundExpression>.GetInstance(method.ParameterCount);
Binder\ForLoopBinder.cs (1)
30var locals = ArrayBuilder<LocalSymbol>.GetInstance();
Binder\ImportChain.cs (2)
61var usedNamespaces = ArrayBuilder<Cci.UsedNamespaceOrType>.GetInstance(); 98var aliases = ArrayBuilder<string>.GetInstance(aliasSymbols.Count);
Binder\Imports.cs (2)
97var expandedUsingsBuilder = ArrayBuilder<NamespaceOrTypeAndUsingDirective>.GetInstance(previousSubmissionUsings.Length); 128var nameParts = ArrayBuilder<string>.GetInstance();
Binder\LocalBinderFactory.cs (1)
246var invocations = ArrayBuilder<InvocationExpressionSyntax>.GetInstance();
Binder\PatternExplainer.cs (2)
73var result = ArrayBuilder<BoundDecisionDagNode>.GetInstance(capacity: distanceToNode); 113var pathBuilder = ArrayBuilder<BoundDecisionDagNode>.GetInstance();
Binder\RefSafetyAnalysis.cs (8)
346var placeholders = ArrayBuilder<(BoundValuePlaceholderBase, SafeContext)>.GetInstance(); 363var placeholders = ArrayBuilder<(BoundValuePlaceholderBase, SafeContext)>.GetInstance(); 668var placeholders = ArrayBuilder<(BoundValuePlaceholderBase, SafeContext)>.GetInstance(); 813var escapeValues = ArrayBuilder<EscapeValue>.GetInstance(); 909var placeholders = ArrayBuilder<(BoundValuePlaceholderBase, SafeContext)>.GetInstance(); 970var placeholders = ArrayBuilder<(BoundValuePlaceholderBase, SafeContext)>.GetInstance(); 1033var builder = ArrayBuilder<DeconstructionVariable>.GetInstance(arguments.Length); 1106var placeholders = ArrayBuilder<(BoundValuePlaceholderBase, SafeContext)>.GetInstance();
Binder\ScriptLocalScopeBinder.cs (1)
81var builder = ArrayBuilder<LabelSymbol>.GetInstance();
Binder\Semantics\BestTypeInferrer.cs (1)
96var builder = ArrayBuilder<TypeSymbol>.GetInstance(candidateTypes.Count);
Binder\Semantics\Conversions\Conversion.cs (1)
1116var builder = ArrayBuilder<MethodSymbol>.GetInstance();
Binder\Semantics\Conversions\Conversions.cs (1)
203var builder = ArrayBuilder<Conversion>.GetInstance(elements.Length);
Binder\Semantics\Conversions\ConversionsBase.cs (6)
1194var innerConversions = ArrayBuilder<Conversion>.GetInstance(switchExpression.SwitchArms.Length); 2343var argumentConversions = ArrayBuilder<Conversion>.GetInstance(arguments.Length); 2417var nestedConversions = ArrayBuilder<Conversion>.GetInstance(sourceTypes.Length); 3162var typeParameters = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 3163var sourceTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 3164var destinationTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance();
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (5)
36var d = ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)>.GetInstance(); 40var ubuild = ArrayBuilder<UserDefinedConversionAnalysis>.GetInstance(); 220var operators = ArrayBuilder<MethodSymbol>.GetInstance(); 225var candidates = ArrayBuilder<MethodSymbol>.GetInstance(operators.Count); 230var operators2 = ArrayBuilder<MethodSymbol>.GetInstance();
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (5)
80var d = ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)>.GetInstance(); 84var ubuild = ArrayBuilder<UserDefinedConversionAnalysis>.GetInstance(); 289var operators = ArrayBuilder<MethodSymbol>.GetInstance(); 961var d = ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)>.GetInstance(); 967var ubuild = ArrayBuilder<UserDefinedConversionAnalysis>.GetInstance();
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (9)
110var rightOperators = ArrayBuilder<BinaryOperatorAnalysisResult>.GetInstance(); 160var rightOperators = ArrayBuilder<BinaryOperatorAnalysisResult>.GetInstance(); 230var operators = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 252var operators = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 253var results = ArrayBuilder<BinaryOperatorAnalysisResult>.GetInstance(); 711var operators = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 884var operators = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 932var operators2 = ArrayBuilder<BinaryOperatorSignature>.GetInstance(); 961var typeOperators = ArrayBuilder<MethodSymbol>.GetInstance();
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (5)
256var operators = ArrayBuilder<UnaryOperatorSignature>.GetInstance(); 388var operators = ArrayBuilder<UnaryOperatorSignature>.GetInstance(); 432var resultsFromInterface = ArrayBuilder<UnaryOperatorAnalysisResult>.GetInstance(); 488var operators2 = ArrayBuilder<UnaryOperatorSignature>.GetInstance(); 517var typeOperators = ArrayBuilder<MethodSymbol>.GetInstance();
Binder\Semantics\OverloadResolution\AnalyzedArguments.cs (1)
67var builder = ArrayBuilder<string?>.GetInstance(this.Names.Count);
Binder\Semantics\OverloadResolution\IMemberResolutionResultWithPriority.cs (1)
8/// Abstraction for use in <see cref="OverloadResolution.RemoveLowerPriorityMembers{TMemberResolution, TMember}(PooledObjects.ArrayBuilder{TMemberResolution})"/>,
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (10)
1918var sourceTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 1919var targetTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 2360var typeParameters = ArrayBuilder<TypeParameterSymbol>.GetInstance(); 2361var sourceTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 2362var targetTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 2710var typeParameters = ArrayBuilder<TypeParameterSymbol>.GetInstance(); 2711var sourceTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 2712var targetTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 2901var initialCandidates = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 3271var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(_fixedResults.Length);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (10)
239var typeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(0); 294var applicableMethods = ArrayBuilder<MethodSymbol>.GetInstance(methods.Count); 563var typeArgumentsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 802var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 1863var inapplicableMembers = ArrayBuilder<TMemberResolution>.GetInstance(); 1971var worse = ArrayBuilder<int>.GetInstance(results.Count, unknown); 3308var returnStatements = ArrayBuilder<BoundReturnStatement>.GetInstance(); 3839var types = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 3976var types = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 3977var refs = ArrayBuilder<RefKind>.GetInstance();
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
136var result = ArrayBuilder<TMember>.GetInstance();
Binder\SwitchBinder.cs (2)
136var builder = ArrayBuilder<LocalSymbol>.GetInstance(); 148var builder = ArrayBuilder<LocalFunctionSymbol>.GetInstance();
Binder\SwitchBinder_Patterns.cs (5)
89var sectionBuilder = ArrayBuilder<BoundSwitchSection>.GetInstance(switchSections.Length); 93var labelBuilder = ArrayBuilder<BoundSwitchLabel>.GetInstance(oldSection.SwitchLabels.Length); 166var boundSwitchSectionsBuilder = ArrayBuilder<BoundSwitchSection>.GetInstance(SwitchSyntax.Sections.Count); 187var boundLabelsBuilder = ArrayBuilder<BoundSwitchLabel>.GetInstance(node.Labels.Count); 200var boundStatementsBuilder = ArrayBuilder<BoundStatement>.GetInstance(node.Statements.Count);
Binder\SwitchExpressionBinder.cs (2)
142var typesInOrder = ArrayBuilder<TypeSymbol>.GetInstance(); 177var builder = ArrayBuilder<BoundSwitchExpressionArm>.GetInstance();
Binder\UsingStatementBinder.cs (3)
36var locals = ArrayBuilder<LocalSymbol>.GetInstance(); 42var locals = ArrayBuilder<LocalSymbol>.GetInstance(declarationSyntax.Variables.Count); 206var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(disposeMethod.ParameterCount);
Binder\WhileBinder.cs (1)
50var locals = ArrayBuilder<LocalSymbol>.GetInstance();
BoundTree\BoundNodeExtensions.cs (2)
114var stack = ArrayBuilder<BoundBinaryOperator>.GetInstance(); 203var originalStack = ArrayBuilder<BoundBinaryOperator>.GetInstance();
BoundTree\BoundTreeRewriter.cs (3)
118var stack = ArrayBuilder<BoundBinaryOperator>.GetInstance(); 162var stack = ArrayBuilder<BoundIfStatement>.GetInstance(); 207var stack = ArrayBuilder<BoundBinaryPattern>.GetInstance();
BoundTree\BoundTreeWalker.cs (3)
112var rightOperands = ArrayBuilder<BoundExpression>.GetInstance(); 152var rightOperands = ArrayBuilder<BoundPattern>.GetInstance(); 183var calls = ArrayBuilder<BoundCall>.GetInstance();
BoundTree\Constructors.cs (1)
236var builder = ArrayBuilder<RefKind>.GetInstance(result.Length);
BoundTree\LengthBasedStringSwitchData.cs (4)
151var lengthCaseLabels = ArrayBuilder<(int value, LabelSymbol label)>.GetInstance(); 152var charJumpTables = ArrayBuilder<CharJumpTable>.GetInstance(); 153var stringJumpTables = ArrayBuilder<StringJumpTable>.GetInstance(); 186var charCaseLabels = ArrayBuilder<(char value, LabelSymbol label)>.GetInstance();
BoundTree\NullabilityRewriter.cs (3)
32var stack = ArrayBuilder<(BoundIfStatement, BoundExpression, BoundStatement)>.GetInstance(); 77var stack = ArrayBuilder<BoundBinaryOperatorBase>.GetInstance(); 235var builder = ArrayBuilder<T>.GetInstance(symbols.Length);
BoundTree\UnboundLambda.cs (9)
144var returnTypes = ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>.GetInstance(); 205var types = ArrayBuilder<(BoundExpression expr, TypeWithAnnotations resultType, bool isChecked)>.GetInstance(); 651var parameterRefKindsBuilder = ArrayBuilder<RefKind>.GetInstance(ParameterCount); 652var parameterScopesBuilder = ArrayBuilder<ScopedKind>.GetInstance(ParameterCount); 653var parameterTypesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(ParameterCount); 719var returnTypes = ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>.GetInstance(); 954var returnTypes = ArrayBuilder<(BoundReturnStatement, TypeWithAnnotations)>.GetInstance(); 1106var typesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(parameterCount); 1107var refKindsBuilder = ArrayBuilder<RefKind>.GetInstance(parameterCount);
CodeGen\CodeGenerator.cs (2)
241var yieldPointBuilder = ArrayBuilder<int>.GetInstance(); 242var resumePointBuilder = ArrayBuilder<int>.GetInstance();
CodeGen\EmitExpression.cs (1)
1695var calls = ArrayBuilder<BoundCall>.GetInstance();
CodeGen\EmitOperators.cs (1)
110var stack = ArrayBuilder<BoundBinaryOperator>.GetInstance();
CodeGen\EmitStatement.cs (2)
426var stack = ArrayBuilder<(BoundExpression? condition, StrongBox<object?> destBox, bool sense)>.GetInstance(); 1980var casesBuilder = ArrayBuilder<(ConstantValue, LabelSymbol)>.GetInstance();
CodeGen\Optimizer.cs (7)
96var dummies = ArrayBuilder<LocalDefUseInfo>.GetInstance(); 132var defs = ArrayBuilder<LocalDefUseSpan>.GetInstance(dummies.Count); 436var evalStack = ArrayBuilder<ValueTuple<BoundExpression, ExprContext>>.GetInstance(); 1113var calls = ArrayBuilder<BoundCall>.GetInstance(); 1483var stack = ArrayBuilder<BoundBinaryOperator>.GetInstance(); 2077var stack = ArrayBuilder<BoundBinaryOperator>.GetInstance(); 2215var calls = ArrayBuilder<BoundCall>.GetInstance();
CommandLine\CSharpCommandLineParser.cs (10)
55var flattenedArgs = ArrayBuilder<string>.GetInstance(); 103var analyzerConfigPaths = ArrayBuilder<string>.GetInstance(); 110var defines = ArrayBuilder<string>.GetInstance(); 927var builder = ArrayBuilder<string>.GetInstance(); 1721var builder = ArrayBuilder<string>.GetInstance(); 1750var builder = ArrayBuilder<string>.GetInstance(); 1881var builder = ArrayBuilder<ReadOnlyMemory<char>>.GetInstance(); 1940var builder = ArrayBuilder<ReadOnlyMemory<char>>.GetInstance(); 2095var parts = ArrayBuilder<ReadOnlyMemory<char>>.GetInstance(); 2135var idsBuilder = ArrayBuilder<string>.GetInstance();
Compilation\BuiltInOperators.cs (2)
41var builder = ArrayBuilder<UnaryOperatorSignature>.GetInstance(); 294var builder = ArrayBuilder<BinaryOperatorSignature>.GetInstance();
Compilation\CSharpCompilation.cs (9)
1419var modules = ArrayBuilder<ModuleSymbol>.GetInstance(); 1585var boundUsings = ArrayBuilder<NamespaceOrTypeAndUsingDirective>.GetInstance(); 1923var entryPointCandidates = ArrayBuilder<MethodSymbol>.GetInstance(); 1991var taskEntryPoints = ArrayBuilder<(bool IsValid, MethodSymbol Candidate, BindingDiagnosticBag SpecificDiagnostics)>.GetInstance(); 2016var viableEntryPoints = ArrayBuilder<MethodSymbol>.GetInstance(); 3886var builder = ArrayBuilder<byte>.GetInstance(length); 4142var typesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(elementTypes.Length); 4208var fields = ArrayBuilder<AnonymousTypeField>.GetInstance(); 4863var spine = ArrayBuilder<MergedNamespaceOrTypeDeclaration>.GetInstance();
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (1)
38var boundUsings = ArrayBuilder<NamespaceOrTypeAndUsingDirective>.GetInstance();
Compilation\CSharpCompilerDiagnosticAnalyzer.cs (1)
24var builder = ArrayBuilder<int>.GetInstance(errorCodes.Length);
Compilation\CSharpSemanticModel.cs (12)
1636var results = ArrayBuilder<ISymbol>.GetInstance(info.Count); 1955var builder = ArrayBuilder<Symbol>.GetInstance(symbols.Count); 3617var builder = ArrayBuilder<Symbol>.GetInstance(); 4093var symbols = ArrayBuilder<ISymbol>.GetInstance(); 4141var builder = ArrayBuilder<IPropertySymbol>.GetInstance(); 4516var symbols = ArrayBuilder<ISymbol>.GetInstance(); 4563var methods = ArrayBuilder<MethodSymbol>.GetInstance(); 4564var filteredMethods = ArrayBuilder<MethodSymbol>.GetInstance(); 4628var extensionMethods = ArrayBuilder<MethodSymbol>.GetInstance(); 4769var methodBuilder = ArrayBuilder<MethodSymbol>.GetInstance(); 4770var filteredMethodBuilder = ArrayBuilder<MethodSymbol>.GetInstance(); 5409var builder = ArrayBuilder<IImportScope>.GetInstance();
Compilation\MemberSemanticModel.NodeMapBuilder.cs (2)
196var stack = ArrayBuilder<BoundExpression>.GetInstance(); 225var stack = ArrayBuilder<BoundPattern>.GetInstance();
Compilation\SymbolInfoFactory.cs (1)
54var result = ArrayBuilder<ISymbol>.GetInstance(symbols.Count);
Compilation\SyntaxAndDeclarationManager.cs (5)
56var treesBuilder = ArrayBuilder<SyntaxTree>.GetInstance(); 112var treesBuilder = ArrayBuilder<SyntaxTree>.GetInstance(); 333var treesBuilder = ArrayBuilder<SyntaxTree>.GetInstance(); 523var treesBuilder = ArrayBuilder<SyntaxTree>.GetInstance(); 618var builder = ArrayBuilder<WeakReference<StrongBox<ImmutableSegmentedHashSet<string>>>>.GetInstance();
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
133var fields = ArrayBuilder<FieldSymbol>.GetInstance(anonymousType.Properties.Length);
Compiler\MethodBodySynthesizer.cs (1)
61var statements = ArrayBuilder<BoundStatement>.GetInstance();
Compiler\MethodBodySynthesizer.Lowered.cs (1)
457var argBuilder = ArrayBuilder<BoundExpression>.GetInstance();
Compiler\MethodCompiler.cs (13)
264var lambdaDebugInfoBuilder = ArrayBuilder<EncLambdaInfo>.GetInstance(); 265var lambdaRuntimeRudeEditsBuilder = ArrayBuilder<LambdaRuntimeRudeEditInfo>.GetInstance(); 266var closureDebugInfoBuilder = ArrayBuilder<EncClosureInfo>.GetInstance(); 267var stateMachineStateDebugInfoBuilder = ArrayBuilder<StateMachineStateDebugInfo>.GetInstance(); 714var stateMachineStateDebugInfoBuilder = ArrayBuilder<StateMachineStateDebugInfo>.GetInstance(); 1166var lambdaDebugInfoBuilder = ArrayBuilder<EncLambdaInfo>.GetInstance(); 1167var lambdaRuntimeRudeEditsBuilder = ArrayBuilder<LambdaRuntimeRudeEditInfo>.GetInstance(); 1168var closureDebugInfoBuilder = ArrayBuilder<EncClosureInfo>.GetInstance(); 1169var stateMachineStateDebugInfoBuilder = ArrayBuilder<StateMachineStateDebugInfo>.GetInstance(); 1232var initializers = ArrayBuilder<BoundStatement>.GetInstance(capturedParameters.Count); 1658var hoistedVariables = ArrayBuilder<EncHoistedLocalInfo>.GetInstance(); 1659var awaiters = ArrayBuilder<Cci.ITypeReference>.GetInstance(); 1909var stmts = ArrayBuilder<BoundStatement>.GetInstance();
CSharpParseOptions.cs (2)
199var builder = ArrayBuilder<ImmutableArray<string>>.GetInstance(); 200var singleNamespaceBuilder = ArrayBuilder<string>.GetInstance();
Declarations\DeclarationTable.cs (1)
128var builder = ArrayBuilder<SingleNamespaceDeclaration>.GetInstance(oldRootDeclarations.Length + 1);
Declarations\DeclarationTreeBuilder.cs (5)
147var childrenBuilder = ArrayBuilder<SingleNamespaceOrTypeDeclaration>.GetInstance(); 269var rootChildren = ArrayBuilder<SingleNamespaceOrTypeDeclaration>.GetInstance(); 270var scriptChildren = ArrayBuilder<SingleTypeDeclaration>.GetInstance(); 312var directives = ArrayBuilder<ReferenceDirective>.GetInstance(directiveNodes.Count); 790var children = ArrayBuilder<SingleTypeDeclaration>.GetInstance();
Declarations\MergedNamespaceDeclaration.cs (2)
67var builder = ArrayBuilder<Location>.GetInstance(); 141var children = ArrayBuilder<MergedNamespaceOrTypeDeclaration>.GetInstance();
Declarations\MergedTypeDeclaration.cs (3)
57var attributeSyntaxListBuilder = ArrayBuilder<SyntaxList<AttributeListSyntax>>.GetInstance(); 178var builder = ArrayBuilder<SourceLocation>.GetInstance(Declarations.Length); 206var children = ArrayBuilder<MergedTypeDeclaration>.GetInstance();
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (5)
404var otherParamsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(sig.ParameterCount); 405var otherParamRefCustomModifiersBuilder = ArrayBuilder<ImmutableArray<CustomModifier>>.GetInstance(sig.ParameterCount); 779var members = ArrayBuilder<ISymbolInternal>.GetInstance(); 921var translatedParamsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(sig.ParameterCount); 922var translatedParamRefCustomModifiersBuilder = ArrayBuilder<ImmutableArray<CustomModifier>>.GetInstance(sig.ParameterCount);
Emitter\EditAndContinue\EmitHelpers.cs (2)
120var updatedMethods = ArrayBuilder<MethodDefinitionHandle>.GetInstance(); 121var changedTypes = ArrayBuilder<TypeDefinitionHandle>.GetInstance();
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
146var builder = ArrayBuilder<AnonymousTypeKeyField>.GetInstance();
Emitter\Model\AttributeDataAdapter.cs (2)
27var builder = ArrayBuilder<Cci.IMetadataExpression>.GetInstance(); 64var builder = ArrayBuilder<Cci.IMetadataNamedArgument>.GetInstance();
Emitter\Model\GenericTypeInstanceReference.cs (1)
41var builder = ArrayBuilder<Cci.ITypeReference>.GetInstance();
Emitter\Model\MostCommonNullableValueBuilder.cs (1)
71var builder = ArrayBuilder<byte>.GetInstance();
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
868var builder = ArrayBuilder<Microsoft.Cci.ITypeReference>.GetInstance();
Emitter\Model\PEAssemblyBuilder.cs (2)
93var builder = ArrayBuilder<NamedTypeSymbol>.GetInstance(); 125var builder = ArrayBuilder<Cci.IFileReference>.GetInstance();
Emitter\Model\PEModuleBuilder.cs (8)
218var typesToProcess = ArrayBuilder<Cci.ITypeDefinition>.GetInstance(); 219var debugDocuments = ArrayBuilder<Cci.DebugSourceDocument>.GetInstance(); 222var namespacesAndTopLevelTypesToProcess = ArrayBuilder<NamespaceOrTypeSymbol>.GetInstance(); 634var builder = ArrayBuilder<Cci.ExportedType>.GetInstance(); 744var stack = ArrayBuilder<(NamedTypeSymbol type, int parentIndex)>.GetInstance(); 1405var builder = ArrayBuilder<Cci.IParameterTypeInformation>.GetInstance(); 1560var flagsBuilder = ArrayBuilder<byte>.GetInstance(); 1649var builder = ArrayBuilder<bool>.GetInstance();
Emitter\Model\SpecializedGenericNestedTypeInstanceReference.cs (1)
40var builder = ArrayBuilder<Cci.ITypeReference>.GetInstance();
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
50var rawInfos = ArrayBuilder<DiagnosticInfo>.GetInstance();
FlowAnalysis\AbstractFlowPass.cs (6)
1084var stack = ArrayBuilder<BoundBinaryPattern>.GetInstance(); 1347var calls = ArrayBuilder<BoundCall>.GetInstance(); 1769var stack = ArrayBuilder<(TLocalState, BoundIfStatement)>.GetInstance(); 2412var stack = ArrayBuilder<BoundExpression>.GetInstance(); 2538var stack = ArrayBuilder<BoundBinaryOperator>.GetInstance(); 2687var parts = ArrayBuilder<BoundInterpolatedString>.GetInstance();
FlowAnalysis\DefiniteAssignment.cs (2)
643var builder = ArrayBuilder<FieldSymbol>.GetInstance(implicitlyInitializedFields.Count); 2097var stack = ArrayBuilder<(BoundBinaryPattern pattern, bool def)>.GetInstance();
FlowAnalysis\FlowAnalysisPass.cs (2)
119var builder = ArrayBuilder<BoundStatement>.GetInstance(implicitlyInitializedFields.Length); 172var builder = ArrayBuilder<BoundStatement>.GetInstance(n);
FlowAnalysis\NullableWalker.cs (32)
247/// The delegate is invoked by <see cref="VisitConversion(BoundConversion, BoundExpression, Conversion, TypeWithAnnotations, TypeWithState, bool, bool, bool, AssignmentKind, ParameterSymbol, bool, bool, bool, bool, Optional&lt;LocalState&gt;,bool, Location, ArrayBuilder&lt;VisitResult&gt;)"/>. 954var builder = ArrayBuilder<Symbol>.GetInstance(members.Length + baseRequiredMembers.Count); 2788var members = ArrayBuilder<(VariableIdentifier, int)>.GetInstance(); 2808var members = ArrayBuilder<(VariableIdentifier, int)>.GetInstance(); 3131var localFuncs = ArrayBuilder<BoundLocalFunctionStatement?>.GetInstance(); 3755var resultBuilder = ArrayBuilder<VisitResult>.GetInstance(node.Elements.Length); 3756var elementConversionCompletions = ArrayBuilder<Func<TypeWithAnnotations, TypeWithState>>.GetInstance(); 4449var builder = ArrayBuilder<VisitResult>.GetInstance(argumentResults.Length); 4628var expressions = ArrayBuilder<BoundExpression>.GetInstance(initialization.Initializers.Length); 4653var expressionsNoConversions = ArrayBuilder<BoundExpression>.GetInstance(n); 4654var conversions = ArrayBuilder<Conversion>.GetInstance(n); 4655var expressionTypes = ArrayBuilder<TypeWithState>.GetInstance(n); 4656var placeholderBuilder = ArrayBuilder<BoundExpression>.GetInstance(n); 4782var resultTypes = ArrayBuilder<TypeWithAnnotations>.GetInstance(n); 4783var placeholdersBuilder = ArrayBuilder<BoundExpression>.GetInstance(n); 5341var slotBuilder = ArrayBuilder<int>.GetInstance(); 5482var slotBuilder = ArrayBuilder<int>.GetInstance(); 6239var calls = ArrayBuilder<BoundCall>.GetInstance(); 6910var conversionResultsBuilder = ArrayBuilder<VisitResult>.GetInstance(results.Length); 7099var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(arguments.Length + elements.Length - 1); 7107var argsToParamsBuilder = ArrayBuilder<int>.GetInstance(argsToParamsOpt.Length + elements.Length - 1); 7116var refKindsBuilder = ArrayBuilder<RefKind>.GetInstance(refKindsOpt.Length + elements.Length - 1); 7291var resultsBuilder = ArrayBuilder<VisitResult>.GetInstance(n); 7803var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(n); 7804var conversionsBuilder = ArrayBuilder<Conversion>.GetInstance(n); 7888var refKinds = ArrayBuilder<RefKind>.GetInstance(); 7995var builder = ArrayBuilder<BoundExpression>.GetInstance(n); 8024var elementsBuilder = ArrayBuilder<BoundNode>.GetInstance(collectionExpressionVisitResults.Length); 8071var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 8072var nullabilityBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 9878var arguments = ArrayBuilder<BoundExpression>.GetInstance(); 10412var builder = ArrayBuilder<DeconstructionVariable>.GetInstance(arguments.Length);
FlowAnalysis\NullableWalker_Patterns.cs (5)
116var stack = ArrayBuilder<BoundBinaryPattern>.GetInstance(); 913var conversions = ArrayBuilder<Conversion>.GetInstance(numSwitchArms); 914var resultTypes = ArrayBuilder<TypeWithState>.GetInstance(numSwitchArms); 915var expressions = ArrayBuilder<BoundExpression>.GetInstance(numSwitchArms); 916var placeholderBuilder = ArrayBuilder<BoundExpression>.GetInstance(numSwitchArms);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (7)
219var locals = ArrayBuilder<LocalSymbol>.GetInstance(); 220var statements = ArrayBuilder<BoundStatement>.GetInstance(); 251var bodyStatements = ArrayBuilder<BoundStatement>.GetInstance(); 307var cases = ArrayBuilder<SyntheticBoundNodeFactory.SyntheticSwitchSection>.GetInstance(); 488var handlers = ArrayBuilder<SyntheticBoundNodeFactory.SyntheticSwitchSection>.GetInstance(handlersList.Count); 611var prologueBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 639var handlerStatements = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (3)
119var builder = ArrayBuilder<BoundStatement>.GetInstance(); 182var builder = ArrayBuilder<BoundStatement>.GetInstance(); 280var blockBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (6)
144var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 191var locals = ArrayBuilder<LocalSymbol>.GetInstance(); 266var builder = ArrayBuilder<BoundStatement>.GetInstance(); 398var statementsBuilder = ArrayBuilder<BoundStatement>.GetInstance(preamble is null ? 2 : 3); 472var blockBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 559var blockBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (2)
163var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 264var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
226var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\AsyncRewriter\AsyncStateMachine.cs (1)
30var interfaces = ArrayBuilder<NamedTypeSymbol>.GetInstance();
Lowering\ClosureConversion\ClosureConversion.cs (10)
481var environments = ArrayBuilder<SynthesizedClosureEnvironment>.GetInstance(); 672var prologue = ArrayBuilder<BoundExpression>.GetInstance(); 721var addedLocals = ArrayBuilder<LocalSymbol>.GetInstance(); 890var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(loweredSymbol.ParameterCount); 915var refkindsBuilder = ArrayBuilder<RefKind>.GetInstance(argumentsBuilder.Count); 984var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(typeArguments.Length); 1168var newStatements = ArrayBuilder<BoundStatement>.GetInstance(); 1201var newLocals = ArrayBuilder<LocalSymbol>.GetInstance(); 1257var prologueBuilder = ArrayBuilder<BoundStatement>.GetInstance(prologue.Count); 1312var newStatements = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (8)
312var builder = ArrayBuilder<BoundExpression>.GetInstance(); 328var builder = ArrayBuilder<BoundExpression>.GetInstance(); 836var locals = ArrayBuilder<LocalSymbol>.GetInstance(); 837var initializers = ArrayBuilder<BoundExpression>.GetInstance(); 838var parameters = ArrayBuilder<BoundExpression>.GetInstance(); 948var builder = ArrayBuilder<BoundExpression>.GetInstance(); 1002var builder = ArrayBuilder<BoundExpression>.GetInstance(); 1067var membersBuilder = ArrayBuilder<BoundExpression>.GetInstance();
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (1)
83var constructedStructClosures = ArrayBuilder<NamedTypeSymbol>.GetInstance();
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
454var calls = ArrayBuilder<BoundCall>.GetInstance();
Lowering\InitializerRewriter.cs (1)
33var boundStatements = ArrayBuilder<BoundStatement>.GetInstance(boundInitializers.Length);
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
192var fileIndices = ArrayBuilder<BoundExpression>.GetInstance(); 300var prologueStatements = ArrayBuilder<BoundStatement>.GetInstance(2 + (_methodEntryInstrumentation != null ? 1 : 0) + (previousPrologue != null ? 1 : 0));
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (2)
303var prologueBuilder = ArrayBuilder<BoundStatement>.GetInstance(_factory.CurrentFunction.ParameterCount); 562var builder = ArrayBuilder<BoundExpression>.GetInstance();
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
422var bodyStatements = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\IteratorRewriter\IteratorRewriter.cs (2)
280var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 314var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\IteratorRewriter\IteratorStateMachine.cs (1)
31var interfaces = ArrayBuilder<NamedTypeSymbol>.GetInstance();
Lowering\LocalRewriter\LocalRewriter.cs (1)
748var statements = ArrayBuilder<BoundStatement?>.GetInstance(node.Statements.Length);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (5)
589var cases = ArrayBuilder<(ConstantValue value, LabelSymbol label)>.GetInstance(); 646var whenTrueBuilder = ArrayBuilder<(ConstantValue value, LabelSymbol label)>.GetInstance(); 647var whenFalseBuilder = ArrayBuilder<(ConstantValue value, LabelSymbol label)>.GetInstance(); 1020var list = ArrayBuilder<BoundWhenDecisionDagNode>.GetInstance(); 1099var whenFalseSwitchSections = ArrayBuilder<SyntheticSwitchSection>.GetInstance();
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (3)
161var refKindBuilder = ArrayBuilder<RefKind>.GetInstance(); 162var argBuilder = ArrayBuilder<BoundExpression>.GetInstance(); 620var newArguments = ArrayBuilder<BoundExpression>.GetInstance(loweredInput.Arguments.Length);
Lowering\LocalRewriter\LocalRewriter_BasePatternSwitchLocalRewriter.cs (1)
48var armBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (4)
133var stack = ArrayBuilder<BoundBinaryOperator>.GetInstance(); 164var partsBuilder = ArrayBuilder<BoundExpression>.GetInstance(); 1439var sideeffects = ArrayBuilder<BoundExpression>.GetInstance(); 1440var locals = ArrayBuilder<LocalSymbol>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_Block.cs (1)
21var builder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
156var typeArgumentsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 329var calls = ArrayBuilder<BoundCall>.GetInstance(); 730var visitedArgumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(arguments.Length);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (7)
344var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(elements.Length + 1); 582var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(); 759var localsBuilder = ArrayBuilder<BoundLocal>.GetInstance(); 760var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(); 1028var localsBuilder = ArrayBuilder<BoundLocal>.GetInstance(); 1029var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(elements.Length + 1); 1255var builder = ArrayBuilder<BoundExpression>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (4)
27var temps = ArrayBuilder<LocalSymbol>.GetInstance(); 28var stores = ArrayBuilder<BoundExpression>.GetInstance(); 58var eventTemps = ArrayBuilder<LocalSymbol>.GetInstance(); 59var sequence = ArrayBuilder<BoundExpression>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (4)
147var builder = ArrayBuilder<BoundExpression>.GetInstance(bytes.Count + 1); 170var bytesBuilder = ArrayBuilder<byte>.GetInstance(); 172var stack = ArrayBuilder<BoundExpression>.GetInstance(); 960var fieldAccessorsBuilder = ArrayBuilder<BoundExpression>.GetInstance(numElements);
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (6)
39var lhsTemps = ArrayBuilder<LocalSymbol>.GetInstance(); 40var lhsEffects = ArrayBuilder<BoundExpression>.GetInstance(); 77var temps = ArrayBuilder<LocalSymbol>.GetInstance(); 361var builder = ArrayBuilder<BoundExpression>.GetInstance(numElements); 387var outLocals = ArrayBuilder<BoundExpression>.GetInstance(outputPlaceholders.Length); 445var assignmentTargets = ArrayBuilder<Binder.DeconstructionVariable>.GetInstance(variables.Arguments.Length);
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (2)
22var localBuilder = ArrayBuilder<LocalSymbol>.GetInstance(node.Locals.Length); 25var statementBuilder = ArrayBuilder<BoundStatement>.GetInstance(numFixedLocals + 1 + 1); //+1 for body, +1 for hidden seq point
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
169var builder = ArrayBuilder<BoundExpression>.GetInstance(getEnumeratorInfo.Arguments.Length);
Lowering\LocalRewriter\LocalRewriter_ForStatement.cs (3)
74var statementBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 216var statementBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 236var blockBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_IfStatement.cs (3)
18var stack = ArrayBuilder<(BoundIfStatement, GeneratedLabelSymbol, int)>.GetInstance(); 19var builder = ArrayBuilder<BoundStatement>.GetInstance(); 126var builder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (7)
251var localsBuilder = ArrayBuilder<LocalSymbol>.GetInstance(); 252var sideEffectsBuilder = ArrayBuilder<BoundExpression>.GetInstance(); 456var locals = ArrayBuilder<LocalSymbol>.GetInstance(2); 457var sideeffects = ArrayBuilder<BoundExpression>.GetInstance(2); 758var localsBuilder = ArrayBuilder<LocalSymbol>.GetInstance(); 759var sideEffectsBuilder = ArrayBuilder<BoundExpression>.GetInstance(); 815var argumentsBuilder = ArrayBuilder<BoundExpression>.GetInstance(2);
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (1)
112var resultBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_NullCoalescingAssignmentOperator.cs (2)
18var temps = ArrayBuilder<LocalSymbol>.GetInstance(); 19var stores = ArrayBuilder<BoundExpression>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (5)
165var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(); 166var temps = ArrayBuilder<LocalSymbol>.GetInstance(); 203var valueTemps = ArrayBuilder<BoundExpression?>.GetInstance(anonymousType.Properties.Length, fillWithValue: null); 222var builder = ArrayBuilder<BoundExpression>.GetInstance(anonymousType.Properties.Length); 276var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(1 + dynamicSiteCount + loweredInitializers.Count);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
76var result = ArrayBuilder<BoundExpression>.GetInstance(); 169var builder = ArrayBuilder<RefKind>.GetInstance(addMethod.Parameters.Length, RefKind.None);
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (3)
74var result = ArrayBuilder<BoundStatement>.GetInstance(); 75var outerVariables = ArrayBuilder<LocalSymbol>.GetInstance(); 133var sectionBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_Range.cs (2)
84var sideeffects = ArrayBuilder<BoundExpression>.GetInstance(); 85var locals = ArrayBuilder<LocalSymbol>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (2)
53var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(); 54var locals = ArrayBuilder<LocalSymbol>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (4)
225var unwrappedArgsBuilder = ArrayBuilder<BoundExpression>.GetInstance(capacity: wrappedArgs.Length); 423var preparedArgs = ArrayBuilder<BoundExpression>.GetInstance(capacity: args.Count); 532var preparedArgsBuilder = ArrayBuilder<BoundExpression>.GetInstance(capacity: args.Length); 533var localsBuilder = ArrayBuilder<LocalSymbol>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
69var resultExpressions = ArrayBuilder<BoundExpression>.GetInstance(parts.Length + 1);
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (3)
49var result = ArrayBuilder<BoundStatement>.GetInstance(); 50var outerVariables = ArrayBuilder<LocalSymbol>.GetInstance(); 94var sectionBuilder = ArrayBuilder<BoundStatement>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (8)
31var initEffects = ArrayBuilder<BoundExpression>.GetInstance(); 32var temps = ArrayBuilder<LocalSymbol>.GetInstance(); 64var builder = ArrayBuilder<BoundExpression>.GetInstance(tuple.Arguments.Length); 112var fieldAccessorsBuilder = ArrayBuilder<BoundExpression>.GetInstance(numElements); 152var builder = ArrayBuilder<BoundExpression>.GetInstance(tuple.Arguments.Length); 288var outerEffects = ArrayBuilder<BoundExpression>.GetInstance(); 289var innerEffects = ArrayBuilder<BoundExpression>.GetInstance(); 449var argumentBuilder = ArrayBuilder<BoundExpression>.GetInstance(tupleCardinality);
Lowering\LocalRewriter\LoweredDynamicOperation.cs (1)
44var children = ArrayBuilder<BoundExpression>.GetInstance();
Lowering\MethodToClassRewriter.cs (2)
122var newLocals = ArrayBuilder<LocalSymbol>.GetInstance(); 336var visitedTypeArgs = ArrayBuilder<TypeWithAnnotations>.GetInstance(typeArgs.Length);
Lowering\SpillSequenceSpiller.cs (1)
629var result = ArrayBuilder<BoundExpression>.GetInstance(newList.Length);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (8)
304var hoistedLocalsWithDebugScopes = ArrayBuilder<StateMachineFieldSymbol>.GetInstance(); 344var variableCleanup = ArrayBuilder<BoundExpression>.GetInstance(); 448var variableCleanup = ArrayBuilder<BoundExpression>.GetInstance(); 524var sideEffects = ArrayBuilder<BoundExpression>.GetInstance(); 526var hoistedFields = ArrayBuilder<StateMachineFieldSymbol>.GetInstance(); 589var indices = ArrayBuilder<BoundExpression>.GetInstance(); 750var newLocalsBuilder = ArrayBuilder<LocalSymbol>.GetInstance(); 751var hoistedLocalsWithDebugScopes = ArrayBuilder<StateMachineFieldSymbol>.GetInstance();
Lowering\StateMachineRewriter\StateMachineRewriter.cs (5)
143var nonReusableFieldsForCleanupBuilder = ArrayBuilder<FieldSymbol>.GetInstance(); 290var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 308var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 425var bodyBuilder = ArrayBuilder<BoundStatement>.GetInstance(); 437var thenBuilder = ArrayBuilder<BoundStatement>.GetInstance(4);
Lowering\SynthesizedMethodBaseSymbol.cs (1)
132var builder = ArrayBuilder<ParameterSymbol>.GetInstance();
Lowering\SyntheticBoundNodeFactory.cs (5)
865var builder = ArrayBuilder<RefKind>.GetInstance(result.Length); 939var statements = ArrayBuilder<BoundStatement>.GetInstance(); 997var builder = ArrayBuilder<BoundExpression>.GetInstance(); 1076var caseBuilder = ArrayBuilder<(ConstantValue Value, LabelSymbol label)>.GetInstance(); 1077var statements = ArrayBuilder<BoundStatement>.GetInstance();
Operations\CSharpOperationFactory.cs (8)
343var builder = ArrayBuilder<TOperation>.GetInstance(boundNodes.Length); 381var builder = ArrayBuilder<IOperation>.GetInstance(children.Length); 408var builder = ArrayBuilder<IVariableDeclaratorOperation>.GetInstance(multipleDeclaration.LocalDeclarations.Length); 1455var stack = ArrayBuilder<BoundBinaryOperatorBase>.GetInstance(); 1804var stack = ArrayBuilder<BoundIfStatement>.GetInstance(); 2277var builder = ArrayBuilder<IInterpolatedStringContentOperation>.GetInstance(parts.Length); 2300var builder = ArrayBuilder<IInterpolatedStringContentOperation>.GetInstance(parts.Length); 2651var stack = ArrayBuilder<BoundBinaryPattern>.GetInstance();
Operations\CSharpOperationFactory_Methods.cs (2)
389var builder = ArrayBuilder<BoundNode>.GetInstance(); 417var builder = ArrayBuilder<IOperation>.GetInstance(arguments.Length);
Parser\LanguageParser.cs (3)
9570var stack = ArrayBuilder<(SyntaxToken, SyntaxToken, ExpressionSyntax, SyntaxToken, StatementSyntax, SyntaxToken)>.GetInstance(); 11348var stack = ArrayBuilder<GreenNode>.GetInstance(); 14142var stack = ArrayBuilder<GreenNode>.GetInstance();
Parser\LanguageParser_InterpolatedString.cs (2)
49var interpolations = ArrayBuilder<Lexer.Interpolation>.GetInstance(); 479var builder = ArrayBuilder<DiagnosticInfo>.GetInstance(infos.Length);
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
262var blocks = ArrayBuilder<SyntaxNode>.GetInstance();
SymbolDisplay\SymbolDisplay.cs (1)
66var builder = ArrayBuilder<SymbolDisplayPart>.GetInstance();
Symbols\AbstractTypeMap.cs (4)
62var newTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(oldTypeArguments.Length); 147var builder = ArrayBuilder<CustomModifier>.GetInstance(customModifiers.Length); 253var builder = ArrayBuilder<ImmutableArray<CustomModifier>>.GetInstance(paramCount); 327var result = ArrayBuilder<TypeWithAnnotations>.GetInstance(original.Length);
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (12)
202var typeArgumentsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(nTypeArguments); 378var builder = ArrayBuilder<TypeParameterSymbol>.GetInstance(); 496var anonymousTypes = ArrayBuilder<AnonymousTypeTemplateSymbol>.GetInstance(); 497var anonymousDelegatesWithIndexedNames = ArrayBuilder<AnonymousDelegateTemplateSymbol>.GetInstance(); 582var anonymousDelegates = ArrayBuilder<AnonymousDelegateTemplateSymbol>.GetInstance(); 674var anonymousDelegates = ArrayBuilder<AnonymousDelegateTemplateSymbol>.GetInstance(); 688var templates = ArrayBuilder<AnonymousTypeTemplateSymbol>.GetInstance(); 703var templates = ArrayBuilder<AnonymousDelegateTemplateSymbol>.GetInstance(); 724var builder = ArrayBuilder<NamedTypeSymbol>.GetInstance(); 726var anonymousTypes = ArrayBuilder<AnonymousTypeTemplateSymbol>.GetInstance(); 731var anonymousDelegatesWithIndexedNames = ArrayBuilder<AnonymousDelegateTemplateSymbol>.GetInstance(); 736var anonymousDelegates = ArrayBuilder<AnonymousDelegateTemplateSymbol>.GetInstance();
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
57var parameters = ArrayBuilder<SynthesizedDelegateInvokeMethod.ParameterDescription>.GetInstance(parameterCount);
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.TypePublicSymbol.cs (2)
41var members = ArrayBuilder<Symbol>.GetInstance(membersCount); 93var builder = ArrayBuilder<Symbol>.GetInstance(symbols.Count);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ConstructorSymbol.cs (1)
29var paramsArr = ArrayBuilder<ParameterSymbol>.GetInstance(fieldsCount);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (5)
56var parameters = ArrayBuilder<SynthesizedDelegateInvokeMethod.ParameterDescription>.GetInstance(parameterCount); 77var typeParameters = ArrayBuilder<TypeParameterSymbol>.GetInstance(parameterCount + (returnsVoid ? 0 : 1)); 126var parameters = ArrayBuilder<SynthesizedDelegateInvokeMethod.ParameterDescription>.GetInstance(parameterCount); 176var typeParameters = ArrayBuilder<TypeParameterSymbol>.GetInstance(typeParameterCount); 197var parameters = ArrayBuilder<SynthesizedDelegateInvokeMethod.ParameterDescription>.GetInstance(parameterCount);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (4)
48var membersBuilder = ArrayBuilder<Symbol>.GetInstance(membersCount); 49var propertiesBuilder = ArrayBuilder<AnonymousTypePropertySymbol>.GetInstance(fieldsCount); 50var typeParametersBuilder = ArrayBuilder<TypeParameterSymbol>.GetInstance(fieldsCount); 129var builder = ArrayBuilder<Symbol>.GetInstance(symbols.Count);
Symbols\ArrayTypeSymbol.cs (1)
108var constructedInterfaces = ArrayBuilder<NamedTypeSymbol>.GetInstance();
Symbols\AssemblySymbol.cs (3)
788var nestedTypes = ArrayBuilder<System.Reflection.TypeInfo>.GetInstance(); 872var typeArgumentSymbols = ArrayBuilder<TypeWithAnnotations>.GetInstance(length); 943var assemblies = ArrayBuilder<AssemblySymbol>.GetInstance();
Symbols\Attributes\AttributeData.cs (2)
272var builder = ArrayBuilder<string>.GetInstance(); 323var builder = ArrayBuilder<string>.GetInstance();
Symbols\Compilation_UsedAssemblies.cs (2)
51var builder = ArrayBuilder<MetadataReference>.GetInstance(setOfReferences.Count); 154var stack = ArrayBuilder<AssemblySymbol>.GetInstance(_lazyUsedAssemblyReferences.Count);
Symbols\Compilation_WellKnownMembers.cs (5)
827var namesBuilder = ArrayBuilder<string?>.GetInstance(); 840var namesBuilder = ArrayBuilder<string?>.GetInstance(); 891var flagsBuilder = ArrayBuilder<bool>.GetInstance(); 903var builder = ArrayBuilder<bool>.GetInstance(); 910var builder = ArrayBuilder<bool>.GetInstance();
Symbols\ConstraintsHelper.cs (10)
80var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 152var constraintTypesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 153var interfacesBuilder = ArrayBuilder<NamedTypeSymbol>.GetInstance(); 616var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 617var nullabilityDiagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 618var underlyingTupleTypeChain = ArrayBuilder<NamedTypeSymbol>.GetInstance(); 683var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 720var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 811var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 1059var constraintTypes = ArrayBuilder<TypeWithAnnotations>.GetInstance();
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (7)
276var modifiersBuilder = ArrayBuilder<CustomModifier>.GetInstance(); 358var paramMergedTypesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(_parameters.Length); 408var paramTypesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(_parameters.Length); 461var paramsBuilder = ArrayBuilder<FunctionPointerParameterSymbol>.GetInstance(originalParameters.Length); 562var paramsBuilder = ArrayBuilder<FunctionPointerParameterSymbol>.GetInstance(parameterTypes.Length); 609var paramTypesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(Parameters.Length); 654var builder = ArrayBuilder<NamedTypeSymbol>.GetInstance(modifiersToSearch.Length);
Symbols\MergedNamespaceSymbol.cs (2)
138var otherSymbols = ArrayBuilder<Symbol>.GetInstance(); 221var builder = ArrayBuilder<Symbol>.GetInstance();
Symbols\Metadata\PE\DynamicTypeDecoder.cs (2)
277var transformedTypeArgsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 364var paramsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(sig.ParameterCount);
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (2)
129var allTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 185var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(type.Signature.ParameterCount);
Symbols\Metadata\PE\PEEventSymbol.cs (1)
396var builder = ArrayBuilder<EventSymbol>.GetInstance();
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1334var explicitInterfaceImplementationsBuilder = ArrayBuilder<MethodSymbol>.GetInstance();
Symbols\Metadata\PE\PENamedTypeSymbol.cs (8)
572var symbols = ArrayBuilder<NamedTypeSymbol>.GetInstance(interfaceImpls.Count); 919var fieldDefs = ArrayBuilder<FieldDefinitionHandle>.GetInstance(); 933var builder = ArrayBuilder<PEFieldSymbol>.GetInstance(); 1039var result = ArrayBuilder<FieldSymbol>.GetInstance(count); 1099var methodDefs = ArrayBuilder<MethodDefinitionHandle>.GetInstance(); 1557var builder = ArrayBuilder<NamedTypeSymbol>.GetInstance(); 1570var types = ArrayBuilder<PENamedTypeSymbol>.GetInstance(); 2702var ownedParams = ArrayBuilder<TypeParameterSymbol>.GetInstance(_arity);
Symbols\Metadata\PE\PENamespaceSymbol.cs (2)
84var builder = ArrayBuilder<Symbol>.GetInstance(memberTypes.Length + lazyNamespaces.Count); 278var children = ArrayBuilder<PENamedTypeSymbol>.GetInstance();
Symbols\Metadata\PE\PEParameterSymbol.cs (2)
877var builder = ArrayBuilder<int>.GetInstance(paramNames.Length); 1107var builder = ArrayBuilder<CSharpAttributeData>.GetInstance();
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
799var builder = ArrayBuilder<PropertySymbol>.GetInstance();
Symbols\Metadata\PE\PETypeParameterSymbol.cs (3)
168var symbolsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 537var symbolsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 668var diagnostics = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance();
Symbols\Metadata\PE\TupleTypeDecoder.cs (2)
216var paramsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(type.Signature.ParameterCount); 313var decodedArgs = ArrayBuilder<TypeWithAnnotations>.GetInstance(typeArgs.Length);
Symbols\NamedTypeSymbol.cs (4)
928var allTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 961var allTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 997var allTypeParameters = ArrayBuilder<TypeParameterSymbol>.GetInstance(); 998var allTypeArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance();
Symbols\NativeIntegerTypeSymbol.cs (1)
79var builder = ArrayBuilder<Symbol>.GetInstance();
Symbols\ParameterSignature.cs (1)
38var types = ArrayBuilder<TypeWithAnnotations>.GetInstance();
Symbols\PublicModel\Symbol.cs (2)
21var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(typeArguments.Length); 44var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(n);
Symbols\ReducedExtensionMethodSymbol.cs (3)
181var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 204var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 568var parameters = ArrayBuilder<ParameterSymbol>.GetInstance(count - 1);
Symbols\ReferenceManager.cs (3)
566var linkedReferencedAssembliesBuilder = ArrayBuilder<AssemblySymbol>.GetInstance(); 899var builder = ArrayBuilder<AssemblySymbol>.GetInstance(); 1114var result = ArrayBuilder<AssemblyIdentity>.GetInstance(builderSize);
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
118var builder = ArrayBuilder<EventSymbol>.GetInstance();
Symbols\Retargeting\RetargetingMethodSymbol.cs (2)
175var parameters = ArrayBuilder<ParameterSymbol>.GetInstance(count); 321var builder = ArrayBuilder<MethodSymbol>.GetInstance();
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (3)
80var builder = ArrayBuilder<Symbol>.GetInstance(underlyingMembers.Length); 118var builder = ArrayBuilder<NamedTypeSymbol>.GetInstance(underlyingMembers.Length); 236var underlyingMethods = ArrayBuilder<MethodSymbol>.GetInstance();
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
178var builder = ArrayBuilder<PropertySymbol>.GetInstance();
Symbols\Retargeting\RetargetingSymbolTranslator.cs (6)
515var oldArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 534var newArguments = ArrayBuilder<TypeWithAnnotations>.GetInstance(oldArguments.Count); 772var newParameterTypesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(paramCount); 773var newParameterCustomModifiersBuilder = ArrayBuilder<ImmutableArray<CustomModifier>>.GetInstance(paramCount); 1202var newArguments = ArrayBuilder<TypedConstant>.GetInstance(constructorArguments.Length); 1271var newArguments = ArrayBuilder<KeyValuePair<string, TypedConstant>>.GetInstance(namedArguments.Length);
Symbols\Source\ConstantEvaluationHelpers.cs (4)
67var fields = ArrayBuilder<SourceFieldSymbolWithSyntaxReference>.GetInstance(); 105var pending = ArrayBuilder<SourceFieldSymbolWithSyntaxReference>.GetInstance(); 168var set = ArrayBuilder<SourceFieldSymbolWithSyntaxReference>.GetInstance(); 296var stack = ArrayBuilder<SourceFieldSymbolWithSyntaxReference>.GetInstance();
Symbols\Source\CustomModifierUtils.cs (2)
83var builder = ArrayBuilder<bool>.GetInstance(); 100var flagsBuilder = ArrayBuilder<byte>.GetInstance();
Symbols\Source\ExplicitInterfaceHelpers.cs (1)
115var builder = ArrayBuilder<T>.GetInstance();
Symbols\Source\IndexedTypeParameterSymbol.cs (1)
109var builder = ArrayBuilder<TypeWithAnnotations>.GetInstance();
Symbols\Source\LambdaSymbol.cs (1)
342var builder = ArrayBuilder<ParameterSymbol>.GetInstance(unboundLambda.ParameterCount);
Symbols\Source\LocalFunctionSymbol.cs (1)
410var result = ArrayBuilder<SourceMethodTypeParameterSymbol>.GetInstance();
Symbols\Source\ParameterHelpers.cs (1)
136var builder = ArrayBuilder<TParameterSymbol>.GetInstance();
Symbols\Source\SourceAssemblySymbol.cs (2)
1066var topLevelTypesFromModules = ArrayBuilder<NamedTypeSymbol>.GetInstance(); 1552var builder = ArrayBuilder<SyntaxList<AttributeListSyntax>>.GetInstance();
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1298var ordinalsBuilder = ArrayBuilder<int>.GetInstance(constructorArgument.Values.Length);
Symbols\Source\SourceDelegateMethodSymbol.cs (2)
357var parameters = ArrayBuilder<ParameterSymbol>.GetInstance(); 397var parameters = ArrayBuilder<ParameterSymbol>.GetInstance();
Symbols\Source\SourceFieldSymbol.cs (1)
255var order = ArrayBuilder<ConstantEvaluationHelpers.FieldInfo>.GetInstance();
Symbols\Source\SourceMemberContainerSymbol.cs (10)
1320var symbols = ArrayBuilder<NamedTypeSymbol>.GetInstance(); 2497var ops1 = ArrayBuilder<MethodSymbol>.GetInstance(); 2502var ops2 = ArrayBuilder<MethodSymbol>.GetInstance(); 2510var ops2 = ArrayBuilder<MethodSymbol>.GetInstance(); 2597var ops = ArrayBuilder<MethodSymbol>.GetInstance(); 3180var builder = ArrayBuilder<ImmutableArray<FieldOrPropertyInitializer>>.GetInstance(initializers.Count); 3615var memberNames = ArrayBuilder<ReadOnlyMemory<char>>.GetInstance(membersByName.Count); 3831var builder = ArrayBuilder<Symbol>.GetInstance(); 4181var members = ArrayBuilder<Symbol>.GetInstance(membersSoFar.Count + 1); 4530var existingOrAddedMembers = ArrayBuilder<Symbol>.GetInstance(recordParameters.Length);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
114var forwardingMethods = ArrayBuilder<SynthesizedExplicitImplementationForwardingMethod>.GetInstance(); 115var methodImpls = ArrayBuilder<(MethodSymbol Body, MethodSymbol Implemented)>.GetInstance();
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
1116var namespaceNames = ArrayBuilder<string>.GetInstance(); 1330var namespaceNames = ArrayBuilder<string>.GetInstance();
Symbols\Source\SourceModuleSymbol.cs (2)
132var buffer = ArrayBuilder<AssemblySymbol>.GetInstance(); 343var toVisit = ArrayBuilder<NamespaceOrTypeSymbol>.GetInstance();
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (2)
291var baseInterfaces = ArrayBuilder<NamedTypeSymbol>.GetInstance(); 447var localInterfaces = ArrayBuilder<NamedTypeSymbol>.GetInstance();
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (2)
264var mergedNamespacesOrTypes = ArrayBuilder<NamespaceOrTypeAndUsingDirective>.GetInstance(); 472var builder = ArrayBuilder<AliasAndExternAliasDirective>.GetInstance();
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
1113var result = ArrayBuilder<TypeParameterSymbol>.GetInstance();
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
771var parameters = ArrayBuilder<ParameterSymbol>.GetInstance(nParameters);
Symbols\Source\SourceTypeParameterSymbol.cs (1)
120var mergedAttributesBuilder = ArrayBuilder<SyntaxList<AttributeListSyntax>>.GetInstance();
Symbols\Source\TypeParameterBuilder.cs (2)
56var arrayBuilder = ArrayBuilder<Location>.GetInstance(builders.Count); 67var arrayBuilder = ArrayBuilder<SyntaxReference>.GetInstance(builders.Count);
Symbols\SubstitutedMethodSymbol.cs (1)
343var substituted = ArrayBuilder<ParameterSymbol>.GetInstance(count);
Symbols\SubstitutedNamedTypeSymbol.cs (4)
239var builder = ArrayBuilder<Symbol>.GetInstance(); 290var builder = ArrayBuilder<Symbol>.GetInstance(); 344var builder = ArrayBuilder<Symbol>.GetInstance(originalMembers.Length); 399var builder = ArrayBuilder<Symbol>.GetInstance();
Symbols\SubstitutedTypeParameterSymbol.cs (2)
101var constraintTypes = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 161var constraintTypes = ArrayBuilder<TypeWithAnnotations>.GetInstance();
Symbols\Symbol_Attributes.cs (2)
466var builder = ArrayBuilder<Location>.GetInstance(); 542var boundAttributeArrayBuilder = ArrayBuilder<(CSharpAttributeData, BoundAttribute)>.GetInstance();
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
43var membersBuilder = ArrayBuilder<Symbol>.GetInstance();
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
313var membersBuilder = ArrayBuilder<Symbol>.GetInstance();
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
60var statementsBuilder = ArrayBuilder<BoundStatement>.GetInstance(_positionalMembers.Length + 1);
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
130var fields = ArrayBuilder<FieldSymbol>.GetInstance();
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (1)
61var block = ArrayBuilder<BoundStatement>.GetInstance();
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
305var statements = ArrayBuilder<BoundStatement>.GetInstance();
Symbols\Tuples\TupleTypeSymbol.cs (6)
576var elementsMatchedByFields = ArrayBuilder<bool>.GetInstance(elementTypes.Length, fillWithValue: false); 577var members = ArrayBuilder<Symbol>.GetInstance(currentMembers.Length); 582var currentFieldsForElements = ArrayBuilder<FieldSymbol?>.GetInstance(currentValueTuple.Arity); 821var fields = ArrayBuilder<Symbol>.GetInstance(); 986var typesBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(ValueTupleRestPosition - 1 + extensionTupleElementTypes.Length); 1012var builder = ArrayBuilder<FieldSymbol>.GetInstance(TupleElementTypesWithAnnotations(tuple).Length, fillWithValue: null!);
Symbols\TypeMap.cs (1)
173var parameters = ArrayBuilder<TypeParameterSymbol>.GetInstance();
Symbols\TypeSymbol.cs (2)
339var result = ArrayBuilder<NamedTypeSymbol>.GetInstance(); 1261var implementations = ArrayBuilder<(MultiDictionary<Symbol, Symbol>.ValueSet MethodSet, MultiDictionary<NamedTypeSymbol, NamedTypeSymbol> Bases)>.GetInstance();
Symbols\TypeSymbolExtensions.cs (5)
1692var builder = ArrayBuilder<TypeParameterSymbol>.GetInstance(); 1718var allTypeParameters = ArrayBuilder<TypeParameterSymbol>.GetInstance(); 1970var typeArgumentsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(); 2051var paramsBuilder = ArrayBuilder<TypeWithAnnotations>.GetInstance(funcPtrType.Signature.ParameterCount); 2089var builder = ArrayBuilder<Cci.ICustomAttribute>.GetInstance();
Symbols\UnboundGenericType.cs (1)
51var result = ArrayBuilder<TypeWithAnnotations>.GetInstance();
Syntax\CSharpPragmaWarningStateMap.cs (1)
47var directives = ArrayBuilder<DirectiveTriviaSyntax>.GetInstance();
Syntax\CSharpSyntaxTree.cs (2)
233var positions = ArrayBuilder<int>.GetInstance(); 234var states = ArrayBuilder<InternalSyntax.DirectiveStack>.GetInstance();
Syntax\NullableContextStateMap.cs (1)
140var builder = ArrayBuilder<NullableContextState>.GetInstance();
Syntax\SyntaxExtensions.cs (1)
404var stack = ArrayBuilder<SyntaxNode>.GetInstance();
Syntax\SyntaxFacts.cs (1)
577var stack = ArrayBuilder<GreenNode>.GetInstance();
Utilities\ValueSetFactory.NumericValueSet.cs (4)
136var builder = ArrayBuilder<(T first, T last)>.GetInstance(); 167var builder = ArrayBuilder<(T first, T last)>.GetInstance(); 244var builder = ArrayBuilder<(T first, T last)>.GetInstance(); 301var builder = ArrayBuilder<(T first, T last)>.GetInstance();
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (34)
CustomTypeInfo.cs (2)
91var builder = ArrayBuilder<byte>.GetInstance(); 181var builder = ArrayBuilder<string?>.GetInstance();
DkmUtilities.cs (2)
62var builder = ArrayBuilder<MetadataBlock>.GetInstance(); 137var builder = ArrayBuilder<AssemblyReaders>.GetInstance();
DynamicFlagsCustomTypeInfo.cs (1)
93var builder = ArrayBuilder<bool>.GetInstance();
ExpressionCompiler.cs (2)
63var builder = ArrayBuilder<LocalAndMethod>.GetInstance(); 93var builder = ArrayBuilder<Alias>.GetInstance(dkmAliases.Count);
InstructionDecoder.cs (1)
137var builder = ArrayBuilder<TTypeSymbol>.GetInstance();
MetadataUtilities.cs (9)
37var metadataBuilder = ArrayBuilder<ModuleMetadata>.GetInstance(); 45var runtimeWinMdBuilder = ArrayBuilder<ModuleMetadata>.GetInstance(); 150var referencesBuilder = ArrayBuilder<MetadataReference>.GetInstance(); 172var referencesBuilder = ArrayBuilder<MetadataReference>.GetInstance(); 212var referencedModules = ArrayBuilder<AssemblyIdentity>.GetInstance(); 331var builder = ArrayBuilder<ModuleMetadata>.GetInstance(); 410var builder = ArrayBuilder<ModuleMetadata>.GetInstance(); 458var builder = ArrayBuilder<string>.GetInstance(); 478var builder = ArrayBuilder<int>.GetInstance();
PDB\MethodDebugInfo.cs (1)
94var scopesBuilder = ArrayBuilder<int>.GetInstance();
PDB\MethodDebugInfo.Native.cs (6)
94var allScopes = ArrayBuilder<ISymUnmanagedScope>.GetInstance(); 95var containingScopes = ArrayBuilder<ISymUnmanagedScope>.GetInstance(); 165var constantsBuilder = ArrayBuilder<TLocalSymbol>.GetInstance(); 307var groupBuilder = ArrayBuilder<ImportRecord>.GetInstance(importStringGroup.Length); 537var projectLevelImportRecords = ArrayBuilder<ImportRecord>.GetInstance(); 538var fileLevelImportRecords = ArrayBuilder<ImportRecord>.GetInstance();
PDB\MethodDebugInfo.Portable.cs (8)
136var localVariableNamesBuilder = ArrayBuilder<string>.GetInstance(); 137var localConstantsBuilder = ArrayBuilder<TLocalSymbol>.GetInstance(); 228var importGroupsBuilder = ArrayBuilder<ImmutableArray<ImportRecord>>.GetInstance(); 229var externAliasesBuilder = ArrayBuilder<ExternAliasRecord>.GetInstance(); 251var builder = ArrayBuilder<byte>.GetInstance(); 273var importGroupBuilder = ArrayBuilder<ImportRecord>.GetInstance(); 468var builder = ArrayBuilder<string?>.GetInstance(); 480var result = ArrayBuilder<HoistedLocalScopeRecord>.GetInstance();
PDB\PdbHelpers.cs (2)
19var unused = ArrayBuilder<ISymUnmanagedScope>.GetInstance(); 41var stack = ArrayBuilder<ISymUnmanagedScope>.GetInstance();
Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler (1)
GeneratorExtensions.cs (1)
25var outputs = ArrayBuilder<(string, string)>.GetInstance();
Microsoft.CodeAnalysis.Rebuild (1)
CompilationFactory.cs (1)
165var builder = ArrayBuilder<string>.GetInstance(count);
Microsoft.CodeAnalysis.Scripting (8)
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (2)
77var stack = ArrayBuilder<string>.GetInstance(); 243var nestedTypes = ArrayBuilder<TypeInfo>.GetInstance();
Script.cs (3)
252var references = ArrayBuilder<MetadataReference>.GetInstance(); 420var scriptsReversed = ArrayBuilder<Script>.GetInstance(); 434var executors = ArrayBuilder<Func<object[], Task>>.GetInstance(scriptsReversed.Count);
ScriptState.cs (1)
96var result = ArrayBuilder<ScriptVariable>.GetInstance();
Utilities\ParameterValidationHelpers.cs (2)
38var builder = ArrayBuilder<T>.GetInstance(); 46var builder = ArrayBuilder<T>.GetInstance();