| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart_backend; | 5 part of dart_backend; |
| 6 | 6 |
| 7 class LocalPlaceholder { | 7 class LocalPlaceholder { |
| 8 final String identifier; | 8 final String identifier; |
| 9 final Set<Node> nodes; | 9 final Set<Node> nodes; |
| 10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>(); | 10 LocalPlaceholder(this.identifier) : nodes = new Set<Node>(); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 final Map<LibraryElement, Set<Identifier>> privateNodes; | 156 final Map<LibraryElement, Set<Identifier>> privateNodes; |
| 157 final List<DeclarationTypePlaceholder> declarationTypePlaceholders; | 157 final List<DeclarationTypePlaceholder> declarationTypePlaceholders; |
| 158 final Map<String, Set<Identifier>> memberPlaceholders; | 158 final Map<String, Set<Identifier>> memberPlaceholders; |
| 159 final Map<Element, List<ConstructorPlaceholder>> constructorPlaceholders; | 159 final Map<Element, List<ConstructorPlaceholder>> constructorPlaceholders; |
| 160 Map<String, LocalPlaceholder> currentLocalPlaceholders; | 160 Map<String, LocalPlaceholder> currentLocalPlaceholders; |
| 161 Element currentElement; | 161 Element currentElement; |
| 162 FunctionElement topmostEnclosingFunction; | 162 FunctionElement topmostEnclosingFunction; |
| 163 TreeElements treeElements; | 163 TreeElements treeElements; |
| 164 | 164 |
| 165 LibraryElement get coreLibrary => compiler.coreLibrary; | 165 LibraryElement get coreLibrary => compiler.coreLibrary; |
| 166 FunctionElement get entryFunction => compiler.mainApp.find(Compiler.MAIN); | 166 FunctionElement get entryFunction => compiler.mainFunction; |
| 167 DartBackend get backend => compiler.backend; | 167 DartBackend get backend => compiler.backend; |
| 168 | 168 |
| 169 get currentFunctionScope => functionScopes.putIfAbsent( | 169 get currentFunctionScope => functionScopes.putIfAbsent( |
| 170 topmostEnclosingFunction, () => new FunctionScope()); | 170 topmostEnclosingFunction, () => new FunctionScope()); |
| 171 | 171 |
| 172 PlaceholderCollector(this.compiler, this.fixedMemberNames, this.elementAsts) : | 172 PlaceholderCollector(this.compiler, this.fixedMemberNames, this.elementAsts) : |
| 173 nullNodes = new Set<Node>(), | 173 nullNodes = new Set<Node>(), |
| 174 unresolvedNodes = new Set<Node>(), | 174 unresolvedNodes = new Set<Node>(), |
| 175 elementNodes = new Map<Element, Set<Node>>(), | 175 elementNodes = new Map<Element, Set<Node>>(), |
| 176 functionScopes = new Map<FunctionElement, FunctionScope>(), | 176 functionScopes = new Map<FunctionElement, FunctionScope>(), |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 | 634 |
| 635 visitBlock(Block node) { | 635 visitBlock(Block node) { |
| 636 for (Node statement in node.statements.nodes) { | 636 for (Node statement in node.statements.nodes) { |
| 637 if (statement is VariableDefinitions) { | 637 if (statement is VariableDefinitions) { |
| 638 makeVarDeclarationTypePlaceholder(statement); | 638 makeVarDeclarationTypePlaceholder(statement); |
| 639 } | 639 } |
| 640 } | 640 } |
| 641 node.visitChildren(this); | 641 node.visitChildren(this); |
| 642 } | 642 } |
| 643 } | 643 } |
| OLD | NEW |