1 instantiation of PooledHashSet
Microsoft.CodeAnalysis (1)
src\Dependencies\PooledObjects\PooledHashSet.cs (1)
35pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool!, equalityComparer), 128);
109 references to PooledHashSet
Microsoft.CodeAnalysis (60)
Binding\BindingDiagnosticBag.cs (2)
72: this(usePool ? DiagnosticBag.GetInstance() : new DiagnosticBag(), usePool ? PooledHashSet<TAssemblySymbol>.GetInstance() : new HashSet<TAssemblySymbol>()) 80((PooledHashSet<TAssemblySymbol>?)DependenciesBag)?.Free();
Collections\ImmutableArrayExtensions.cs (4)
1059var set = PooledHashSet<T>.GetInstance(); 1392var set = PooledHashSet<TElement>.GetInstance();
Collections\TopologicalSort.cs (2)
102var counted = PooledHashSet<TNode>.GetInstance();
CommandLine\CommandLineArguments.cs (2)
519var resolvedReferencesSet = PooledHashSet<AnalyzerFileReference>.GetInstance();
CommandLine\CommonCompiler.cs (2)
303var processedDirs = PooledHashSet<string>.GetInstance();
DiagnosticAnalyzer\AnalyzerDriver.cs (8)
897var uniqueDiagnosticIds = PooledHashSet<string>.GetInstance(); 1829var processedAnalyzers = PooledHashSet<DiagnosticAnalyzer>.GetInstance(); 2032var unsuppressedAnalyzersBuilder = PooledHashSet<DiagnosticAnalyzer>.GetInstance(); 2079var symbolStartAnalyzers = PooledHashSet<DiagnosticAnalyzer>.GetInstance();
DiagnosticAnalyzer\AnalyzerExecutor.cs (9)
778var blockEndActions = PooledHashSet<TBlockAction>.GetInstance(); 779var blockActions = PooledHashSet<TBlockAction>.GetInstance(); 798var codeBlockEndActions = blockEndActions as PooledHashSet<CodeBlockAnalyzerAction>; 820var operationBlockEndActions = blockEndActions as PooledHashSet<OperationBlockAnalyzerAction>; 872PooledHashSet<TBlockAction> blockActions,
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (2)
896var partialTrees = PooledHashSet<SyntaxTree>.GetInstance();
Emit\EditAndContinue\DefinitionMap.cs (2)
714var lambdaIdSet = PooledHashSet<DebugId>.GetInstance();
NativePdbWriter\PdbWriter.cs (2)
166PooledHashSet<string> lazyDeclaredExternAliases = null; 180lazyDeclaredExternAliases = PooledHashSet<string>.GetInstance();
Operations\ControlFlowGraphBuilder.BasicBlockBuilder.cs (2)
25private PooledHashSet<BasicBlockBuilder>? _predecessors; 171_predecessors = PooledHashSet<BasicBlockBuilder>.GetInstance();
Operations\ControlFlowGraphBuilder.cs (7)
229var dispatchedExceptionsFromRegions = PooledHashSet<ControlFlowRegion>.GetInstance(); 245PooledHashSet<ControlFlowRegion> dispatchedExceptionsFromRegions, 1193PooledHashSet<BasicBlockBuilder>? unresolved = null; 1200unresolved = PooledHashSet<BasicBlockBuilder>.GetInstance(); 1868var idsStillOnTheStack = PooledHashSet<CaptureId>.GetInstance();
ReferenceManager\CommonReferenceManager.Binding.cs (2)
235var resolutionFailures = PooledHashSet<AssemblyIdentity>.GetInstance();
SourceGeneration\Nodes\InputNode.cs (2)
51var itemsSet = (_inputComparer == EqualityComparer<T>.Default) ? PooledHashSet<T>.GetInstance() : new HashSet<T>(_inputComparer); 108(itemsSet as PooledHashSet<T>)?.Free();
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
668var set = PooledHashSet<T>.GetInstance(); 709var set = PooledHashSet<S>.GetInstance();
src\Dependencies\PooledObjects\PooledHashSet.cs (8)
14private readonly ObjectPool<PooledHashSet<T>> _pool; 16private PooledHashSet(ObjectPool<PooledHashSet<T>> pool, IEqualityComparer<T> equalityComparer) : 29private static readonly ObjectPool<PooledHashSet<T>> s_poolInstance = CreatePool(EqualityComparer<T>.Default); 32public static ObjectPool<PooledHashSet<T>> CreatePool(IEqualityComparer<T> equalityComparer) 34ObjectPool<PooledHashSet<T>>? pool = null; 35pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool!, equalityComparer), 128); 39public static PooledHashSet<T> GetInstance() 41var instance = s_poolInstance.Allocate();
Microsoft.CodeAnalysis.CSharp (48)
Binder\Binder.CapturedParametersFinder.cs (1)
32var namesToCheck = PooledHashSet<string>.GetInstance();
Binder\Binder_AnonymousTypes.cs (1)
41var uniqueFieldNames = PooledHashSet<string>.GetInstance();
Binder\Binder_Deconstruct.cs (1)
574var uniqueFieldNames = PooledHashSet<string>.GetInstance();
Binder\Binder_Expressions.cs (4)
968var uniqueFieldNames = PooledHashSet<string>.GetInstance(); 1083var uniqueFieldNames = PooledHashSet<string>.GetInstance(); 1173var toRemove = PooledHashSet<string>.GetInstance(); 5643var memberNameMap = PooledHashSet<string>.GetInstance();
Binder\Binder_Lambda.cs (1)
384var pNames = PooledHashSet<string>.GetInstance();
Binder\Binder_Symbols.cs (1)
686var uniqueFieldNames = PooledHashSet<string>.GetInstance();
Binder\DecisionDagBuilder.cs (1)
214var usedValues = PooledHashSet<BoundDagEvaluation>.GetInstance();
Binder\Imports.cs (1)
204var replacedExternAliases = PooledHashSet<string>.GetInstance();
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
254var shadowedInterfaces = PooledHashSet<NamedTypeSymbol>.GetInstance();
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
431var shadowedInterfaces = PooledHashSet<NamedTypeSymbol>.GetInstance();
Binder\Semantics\OverloadResolution\OverloadResolution_ArgsToParameters.cs (1)
493var alreadyDefined = PooledHashSet<string>.GetInstance();
Compilation\CSharpCompilation.cs (5)
860var externalSyntaxTrees = PooledHashSet<SyntaxTree>.GetInstance(); 929var removeSet = PooledHashSet<SyntaxTree>.GetInstance(); 934var externalSyntaxTrees = PooledHashSet<SyntaxTree>.GetInstance(); 1586var uniqueUsings = PooledHashSet<NamespaceOrTypeSymbol>.GetInstance(); 3573var paths = PooledHashSet<string>.GetInstance();
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (1)
39var uniqueUsings = PooledHashSet<NamespaceOrTypeSymbol>.GetInstance();
Compilation\SyntaxAndDeclarationManager.cs (2)
316var removeSet = PooledHashSet<SyntaxTree>.GetInstance(); 481var removeSet = PooledHashSet<SyntaxTree>.GetInstance();
Declarations\DeclarationTreeBuilder.cs (1)
1018var memberNamesBuilder = PooledHashSet<string>.GetInstance();
Emitter\Model\PEModuleBuilder.cs (1)
220var methodDocumentList = PooledHashSet<Cci.DebugSourceDocument>.GetInstance();
FlowAnalysis\NullableWalker.cs (1)
659var alreadyWarnedMembers = PooledHashSet<Symbol>.GetInstance();
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (2)
77var methodsConvertedToDelegates = PooledHashSet<MethodSymbol>.GetInstance(); 149var capturedEnvs = PooledHashSet<ClosureEnvironment>.GetInstance();
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
191var documents = PooledHashSet<DebugSourceDocument>.GetInstance();
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
163var usedTypeParameters = PooledHashSet<TypeParameterSymbol>.GetInstance();
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (2)
65var hasPredecessor = PooledHashSet<BoundDecisionDagNode>.GetInstance(); 389var loweredNodes = PooledHashSet<BoundDecisionDagNode>.GetInstance();
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
227var locals = PooledHashSet<LocalSymbol>.GetInstance();
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
353var referenced = PooledHashSet<TypeParameterSymbol>.GetInstance();
Symbols\BaseTypeAnalysis.cs (4)
24var hs = PooledHashSet<Symbol>.GetInstance(); 69var hs = PooledHashSet<NamedTypeSymbol>.GetInstance(); 70var typesWithCycle = PooledHashSet<NamedTypeSymbol>.GetInstance(); 153var hs = PooledHashSet<Symbol>.GetInstance();
Symbols\ConstraintsHelper.cs (1)
780var set = PooledHashSet<object>.GetInstance();
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
678var builder = PooledHashSet<CustomModifier>.GetInstance();
Symbols\MethodSymbol.cs (1)
1009var builder = PooledHashSet<INamedTypeSymbolInternal>.GetInstance();
Symbols\ReducedExtensionMethodSymbol.cs (1)
173var notInferredTypeParameters = PooledHashSet<TypeParameterSymbol>.GetInstance();
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
243var builder = PooledHashSet<INamedTypeSymbolInternal>.GetInstance();
Symbols\Source\ConstantEvaluationHelpers.cs (3)
185var updated = PooledHashSet<SourceFieldSymbolWithSyntaxReference>.GetInstance(); 236var updated = PooledHashSet<SourceFieldSymbolWithSyntaxReference>.GetInstance(); 295var set = PooledHashSet<SourceFieldSymbolWithSyntaxReference>.GetInstance();
Symbols\Source\SourceFieldSymbol.cs (2)
292var builder = PooledHashSet<SourceFieldSymbolWithSyntaxReference>.GetInstance(); 329var builder = PooledHashSet<SourceFieldSymbolWithSyntaxReference>.GetInstance();
Symbols\Source\SourceMemberContainerSymbol.cs (1)
4202var memberNames = PooledHashSet<string>.GetInstance();
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
MetadataUtilities.cs (1)
273var referencedIndices = PooledHashSet<int>.GetInstance();