| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 visitTypeLiteralSend(Send node) { | 145 visitTypeLiteralSend(Send node) { |
| 146 DartType type = elements.getTypeLiteralType(node); | 146 DartType type = elements.getTypeLiteralType(node); |
| 147 if (!type.isDynamic) { | 147 if (!type.isDynamic) { |
| 148 if (type is TypeVariableType) { | 148 if (type is TypeVariableType) { |
| 149 collector.makeTypeVariablePlaceholder(node.selector, type); | 149 collector.makeTypeVariablePlaceholder(node.selector, type); |
| 150 } else { | 150 } else { |
| 151 collector.makeTypePlaceholder(node.selector, type); | 151 collector.makeTypePlaceholder(node.selector, type); |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 } | 154 } |
| 155 |
| 156 @override |
| 157 handleNewExpression(NewExpression node) => visitNode(node); |
| 158 |
| 159 @override |
| 160 handleSendSet(SendSet node) => visitNode(node); |
| 155 } | 161 } |
| 156 | 162 |
| 157 class PlaceholderCollector extends Visitor { | 163 class PlaceholderCollector extends Visitor { |
| 158 final DiagnosticListener listener; | 164 final DiagnosticListener listener; |
| 159 final MirrorRenamer mirrorRenamer; | 165 final MirrorRenamer mirrorRenamer; |
| 160 final FunctionElement mainFunction; | 166 final FunctionElement mainFunction; |
| 161 final Set<String> fixedMemberNames; // member names which cannot be renamed. | 167 final Set<String> fixedMemberNames; // member names which cannot be renamed. |
| 162 final Map<Element, ElementAst> elementAsts; | 168 final Map<Element, ElementAst> elementAsts; |
| 163 final Set<Node> prefixNodesToErase = new Set<Node>(); | 169 final Set<Node> prefixNodesToErase = new Set<Node>(); |
| 164 final Set<Node> unresolvedNodes = new Set<Node>(); | 170 final Set<Node> unresolvedNodes = new Set<Node>(); |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 | 706 |
| 701 visitBlock(Block node) { | 707 visitBlock(Block node) { |
| 702 for (Node statement in node.statements.nodes) { | 708 for (Node statement in node.statements.nodes) { |
| 703 if (statement is VariableDefinitions) { | 709 if (statement is VariableDefinitions) { |
| 704 makeVarDeclarationTypePlaceholder(statement); | 710 makeVarDeclarationTypePlaceholder(statement); |
| 705 } | 711 } |
| 706 } | 712 } |
| 707 node.visitChildren(this); | 713 node.visitChildren(this); |
| 708 } | 714 } |
| 709 } | 715 } |
| OLD | NEW |