| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 isNamedOptionalParameter()) { | 272 isNamedOptionalParameter()) { |
| 273 currentFunctionScope.registerParameter(node); | 273 currentFunctionScope.registerParameter(node); |
| 274 } else if (Elements.isLocal(element) && !isTypedefParameter(element)) { | 274 } else if (Elements.isLocal(element) && !isTypedefParameter(element)) { |
| 275 makeLocalPlaceholder(node); | 275 makeLocalPlaceholder(node); |
| 276 } | 276 } |
| 277 } | 277 } |
| 278 | 278 |
| 279 void tryMakeMemberPlaceholder(Identifier node) { | 279 void tryMakeMemberPlaceholder(Identifier node) { |
| 280 assert(node != null); | 280 assert(node != null); |
| 281 if (node is Operator) return; | 281 if (node is Operator) return; |
| 282 final identifier = node.source; | 282 String identifier = node.source; |
| 283 if (fixedMemberNames.contains(identifier)) return; | 283 if (fixedMemberNames.contains(identifier)) return; |
| 284 memberPlaceholders.putIfAbsent( | 284 memberPlaceholders.putIfAbsent( |
| 285 identifier, () => new Set<Identifier>()).add(node); | 285 identifier, () => new Set<Identifier>()).add(node); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void makeTypePlaceholder(Node node, DartType type) { | 288 void makeTypePlaceholder(Node node, DartType type) { |
| 289 Send send = node.asSend(); | 289 Send send = node.asSend(); |
| 290 if (send != null) { | 290 if (send != null) { |
| 291 // Prefix. | 291 // Prefix. |
| 292 assert(send.receiver is Identifier); | 292 assert(send.receiver is Identifier); |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 | 694 |
| 695 visitBlock(Block node) { | 695 visitBlock(Block node) { |
| 696 for (Node statement in node.statements.nodes) { | 696 for (Node statement in node.statements.nodes) { |
| 697 if (statement is VariableDefinitions) { | 697 if (statement is VariableDefinitions) { |
| 698 makeVarDeclarationTypePlaceholder(statement); | 698 makeVarDeclarationTypePlaceholder(statement); |
| 699 } | 699 } |
| 700 } | 700 } |
| 701 node.visitChildren(this); | 701 node.visitChildren(this); |
| 702 } | 702 } |
| 703 } | 703 } |
| OLD | NEW |