diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 691965b0ad7..ec67b496db6 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -33,7 +33,6 @@ module ts { var container: Declaration; var lastContainer: Declaration; var symbolCount = 0; - var lastLocals: Declaration; var Symbol = objectAllocator.getSymbolConstructor(); if (!file.locals) { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8cb72980e74..6541a3641d8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6049,49 +6049,6 @@ module ts { Debug.fail("getLocalNameForSymbol failed"); } - function isNodeParentedBy(node: Node, parent: Node): boolean { - while (node) { - if (node === parent) return true; - node = node.parent; - } - return false; - } - - function isUniqueLocalName(name: string, container: Node): boolean { - name = escapeIdentifier(name); - if (container.locals) { - for (var node = container; isNodeParentedBy(node, container); node = node.nextLocals) { - if (hasProperty(node.locals, name) && node.locals[name].flags & (SymbolFlags.Value | SymbolFlags.ExportValue)) { - return false; - } - } - } - return true; - } - - function getLocalNameOfContainer(container: Declaration): string { - var links = getNodeLinks(container); - if (!links.localModuleName) { - var name = container.name.text ? unescapeIdentifier(container.name.text) : "M"; - while (!isUniqueLocalName(name, container)) { - name = "_" + name; - } - links.localModuleName = name; - } - return links.localModuleName; - } - - function getLocalNameForSymbol(symbol: Symbol, location: Node): string { - var node = location; - while (node) { - if ((node.kind === SyntaxKind.ModuleDeclaration || node.kind === SyntaxKind.EnumDeclaration) && getSymbolOfNode(node) === symbol) { - return getLocalNameOfContainer(node); - } - node = node.parent; - } - Debug.fail("getLocalNameForSymbol failed"); - } - function getExpressionNamePrefix(node: Identifier): string { var symbol = getNodeLinks(node).resolvedSymbol; if (symbol) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 3820920dffa..5decadcfe17 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -691,7 +691,7 @@ module ts { ExportHasLocal = Function | Class | Enum | ValueModule, - HasLocals = Function | Enum | Module | Method | Constructor | Accessor | Signature, + HasLocals = Function | Module | Method | Constructor | Accessor | Signature, HasExports = Class | Enum | Module, HasMembers = Class | Interface | TypeLiteral | ObjectLiteral,