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