| 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); | |
| 161 } | 155 } |
| 162 | 156 |
| 163 class PlaceholderCollector extends Visitor { | 157 class PlaceholderCollector extends Visitor { |
| 164 final DiagnosticListener listener; | 158 final DiagnosticListener listener; |
| 165 final MirrorRenamer mirrorRenamer; | 159 final MirrorRenamer mirrorRenamer; |
| 166 final FunctionElement mainFunction; | 160 final FunctionElement mainFunction; |
| 167 final Set<String> fixedMemberNames; // member names which cannot be renamed. | 161 final Set<String> fixedMemberNames; // member names which cannot be renamed. |
| 168 final Map<Element, ElementAst> elementAsts; | 162 final Map<Element, ElementAst> elementAsts; |
| 169 final Set<Node> prefixNodesToErase = new Set<Node>(); | 163 final Set<Node> prefixNodesToErase = new Set<Node>(); |
| 170 final Set<Node> unresolvedNodes = new Set<Node>(); | 164 final Set<Node> unresolvedNodes = new Set<Node>(); |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 | 700 |
| 707 visitBlock(Block node) { | 701 visitBlock(Block node) { |
| 708 for (Node statement in node.statements.nodes) { | 702 for (Node statement in node.statements.nodes) { |
| 709 if (statement is VariableDefinitions) { | 703 if (statement is VariableDefinitions) { |
| 710 makeVarDeclarationTypePlaceholder(statement); | 704 makeVarDeclarationTypePlaceholder(statement); |
| 711 } | 705 } |
| 712 } | 706 } |
| 713 node.visitChildren(this); | 707 node.visitChildren(this); |
| 714 } | 708 } |
| 715 } | 709 } |
| OLD | NEW |