| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (element.isTopLevel() && node.receiver != null) { | 123 if (element.isTopLevel() && node.receiver != null) { |
| 124 assert(elements[node.receiver].isPrefix()); | 124 assert(elements[node.receiver].isPrefix()); |
| 125 // Hack: putting null into map overrides receiver of original node. | 125 // Hack: putting null into map overrides receiver of original node. |
| 126 collector.makeNullPlaceholder(node.receiver); | 126 collector.makeNullPlaceholder(node.receiver); |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 | 129 |
| 130 internalError(String reason, {Node node}) { | 130 internalError(String reason, {Node node}) { |
| 131 collector.internalError(reason, node: node); | 131 collector.internalError(reason, node: node); |
| 132 } | 132 } |
| 133 |
| 134 visitTypeReferenceSend(Send node) { |
| 135 collector.makeElementPlaceholder(node.selector, elements[node]); |
| 136 } |
| 133 } | 137 } |
| 134 | 138 |
| 135 class PlaceholderCollector extends Visitor { | 139 class PlaceholderCollector extends Visitor { |
| 136 final Compiler compiler; | 140 final Compiler compiler; |
| 137 final Set<String> fixedMemberNames; // member names which cannot be renamed. | 141 final Set<String> fixedMemberNames; // member names which cannot be renamed. |
| 138 final Map<Element, ElementAst> elementAsts; | 142 final Map<Element, ElementAst> elementAsts; |
| 139 final Set<Node> nullNodes; // Nodes that should not be in output. | 143 final Set<Node> nullNodes; // Nodes that should not be in output. |
| 140 final Set<Identifier> unresolvedNodes; | 144 final Set<Identifier> unresolvedNodes; |
| 141 final Map<Element, Set<Node>> elementNodes; | 145 final Map<Element, Set<Node>> elementNodes; |
| 142 final Map<FunctionElement, FunctionScope> functionScopes; | 146 final Map<FunctionElement, FunctionScope> functionScopes; |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 | 605 |
| 602 visitBlock(Block node) { | 606 visitBlock(Block node) { |
| 603 for (Node statement in node.statements.nodes) { | 607 for (Node statement in node.statements.nodes) { |
| 604 if (statement is VariableDefinitions) { | 608 if (statement is VariableDefinitions) { |
| 605 makeVarDeclarationTypePlaceholder(statement); | 609 makeVarDeclarationTypePlaceholder(statement); |
| 606 } | 610 } |
| 607 } | 611 } |
| 608 node.visitChildren(this); | 612 node.visitChildren(this); |
| 609 } | 613 } |
| 610 } | 614 } |
| OLD | NEW |