Skip to content

Commit 6953794

Browse files
committed
remove bloom filters
1 parent 8fcc8b2 commit 6953794

File tree

2 files changed

+2
-221
lines changed

2 files changed

+2
-221
lines changed

src/services/bloomFilter.ts

Lines changed: 0 additions & 186 deletions
This file was deleted.

src/services/services.ts

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
/// <reference path='breakpoints.ts' />
1212
/// <reference path='indentation.ts' />
1313
/// <reference path='formatting\formatting.ts' />
14-
/// <reference path='bloomFilter.ts' />
1514

1615
/// <reference path='core\references.ts' />
1716
/// <reference path='resources\references.ts' />
@@ -71,7 +70,6 @@ module ts {
7170
export interface SourceFile {
7271
getSourceUnit(): TypeScript.SourceUnitSyntax;
7372
getSyntaxTree(): TypeScript.SyntaxTree;
74-
getBloomFilter(): BloomFilter;
7573
update(scriptSnapshot: TypeScript.IScriptSnapshot, version: number, isOpen: boolean, textChangeRange: TypeScript.TextChangeRange): SourceFile;
7674
}
7775

@@ -325,7 +323,6 @@ module ts {
325323
public isOpen: boolean;
326324
public languageVersion: ScriptTarget;
327325

328-
private bloomFilter: BloomFilter;
329326
private syntaxTree: TypeScript.SyntaxTree;
330327
private scriptSnapshot: TypeScript.IScriptSnapshot;
331328

@@ -357,36 +354,6 @@ module ts {
357354
return TypeScript.isDTSFile(this.filename);
358355
}
359356

360-
public getBloomFilter(): BloomFilter {
361-
if (!this.bloomFilter) {
362-
var identifiers: string[] = [];
363-
364-
forEachChild(this, function visit (node: Node) {
365-
switch (node.kind) {
366-
case SyntaxKind.Identifier:
367-
identifiers.push((<Identifier>node).text);
368-
return undefined;
369-
case SyntaxKind.StringLiteral:
370-
if (isNameOfExternalModuleImportOrDeclaration(node)) {
371-
identifiers.push((<LiteralExpression>node).text);
372-
}
373-
// intential fall through
374-
case SyntaxKind.NumericLiteral:
375-
if (isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) {
376-
identifiers.push((<LiteralExpression>node).text);
377-
}
378-
return undefined;
379-
default:
380-
return forEachChild(node, visit);
381-
};
382-
});
383-
384-
this.bloomFilter = new BloomFilter(identifiers.length);
385-
this.bloomFilter.addKeys(identifiers);
386-
}
387-
return this.bloomFilter;
388-
}
389-
390357
public update(scriptSnapshot: TypeScript.IScriptSnapshot, version: number, isOpen: boolean, textChangeRange: TypeScript.TextChangeRange): SourceFile {
391358
// See if we are currently holding onto a syntax tree. We may not be because we're
392359
// either a closed file, or we've just been lazy and haven't had to create the syntax
@@ -2188,10 +2155,10 @@ module ts {
21882155
forEach(program.getSourceFiles(), sourceFile => {
21892156
cancellationToken.throwIfCancellationRequested();
21902157

2191-
if (sourceFile.getBloomFilter().probablyContains(symbolName)) {
2158+
//if (sourceFile.getBloomFilter().probablyContains(symbolName)) {
21922159
result = result || [];
21932160
getReferencesInNode(sourceFile, symbol, symbolName, node, searchMeaning, result);
2194-
}
2161+
//}
21952162
});
21962163
}
21972164

0 commit comments

Comments
 (0)