|
11 | 11 | /// <reference path='breakpoints.ts' />
|
12 | 12 | /// <reference path='indentation.ts' />
|
13 | 13 | /// <reference path='formatting\formatting.ts' />
|
14 |
| -/// <reference path='bloomFilter.ts' /> |
15 | 14 |
|
16 | 15 | /// <reference path='core\references.ts' />
|
17 | 16 | /// <reference path='resources\references.ts' />
|
@@ -71,7 +70,6 @@ module ts {
|
71 | 70 | export interface SourceFile {
|
72 | 71 | getSourceUnit(): TypeScript.SourceUnitSyntax;
|
73 | 72 | getSyntaxTree(): TypeScript.SyntaxTree;
|
74 |
| - getBloomFilter(): BloomFilter; |
75 | 73 | update(scriptSnapshot: TypeScript.IScriptSnapshot, version: number, isOpen: boolean, textChangeRange: TypeScript.TextChangeRange): SourceFile;
|
76 | 74 | }
|
77 | 75 |
|
@@ -325,7 +323,6 @@ module ts {
|
325 | 323 | public isOpen: boolean;
|
326 | 324 | public languageVersion: ScriptTarget;
|
327 | 325 |
|
328 |
| - private bloomFilter: BloomFilter; |
329 | 326 | private syntaxTree: TypeScript.SyntaxTree;
|
330 | 327 | private scriptSnapshot: TypeScript.IScriptSnapshot;
|
331 | 328 |
|
@@ -357,36 +354,6 @@ module ts {
|
357 | 354 | return TypeScript.isDTSFile(this.filename);
|
358 | 355 | }
|
359 | 356 |
|
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 |
| - |
390 | 357 | public update(scriptSnapshot: TypeScript.IScriptSnapshot, version: number, isOpen: boolean, textChangeRange: TypeScript.TextChangeRange): SourceFile {
|
391 | 358 | // See if we are currently holding onto a syntax tree. We may not be because we're
|
392 | 359 | // either a closed file, or we've just been lazy and haven't had to create the syntax
|
@@ -2188,10 +2155,10 @@ module ts {
|
2188 | 2155 | forEach(program.getSourceFiles(), sourceFile => {
|
2189 | 2156 | cancellationToken.throwIfCancellationRequested();
|
2190 | 2157 |
|
2191 |
| - if (sourceFile.getBloomFilter().probablyContains(symbolName)) { |
| 2158 | + //if (sourceFile.getBloomFilter().probablyContains(symbolName)) { |
2192 | 2159 | result = result || [];
|
2193 | 2160 | getReferencesInNode(sourceFile, symbol, symbolName, node, searchMeaning, result);
|
2194 |
| - } |
| 2161 | + //} |
2195 | 2162 | });
|
2196 | 2163 | }
|
2197 | 2164 |
|
|
0 commit comments