| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 .putIfAbsent(element, () => <ConstructorPlaceholder>[]) | 360 .putIfAbsent(element, () => <ConstructorPlaceholder>[]) |
| 361 .add(new ConstructorPlaceholder(node, type)); | 361 .add(new ConstructorPlaceholder(node, type)); |
| 362 } | 362 } |
| 363 void makeRedirectingConstructorPlaceholder(Node node, Element element) { | 363 void makeRedirectingConstructorPlaceholder(Node node, Element element) { |
| 364 constructorPlaceholders | 364 constructorPlaceholders |
| 365 .putIfAbsent(element, () => <ConstructorPlaceholder>[]) | 365 .putIfAbsent(element, () => <ConstructorPlaceholder>[]) |
| 366 .add(new ConstructorPlaceholder.redirectingCall(node)); | 366 .add(new ConstructorPlaceholder.redirectingCall(node)); |
| 367 } | 367 } |
| 368 | 368 |
| 369 void internalError(String reason, {Node node}) { | 369 void internalError(String reason, {Node node}) { |
| 370 compiler.cancel(reason, node: node); | 370 compiler.internalError(node, reason); |
| 371 } | 371 } |
| 372 | 372 |
| 373 visit(Node node) => (node == null) ? null : node.accept(this); | 373 visit(Node node) => (node == null) ? null : node.accept(this); |
| 374 | 374 |
| 375 visitNode(Node node) { node.visitChildren(this); } // We must go deeper. | 375 visitNode(Node node) { node.visitChildren(this); } // We must go deeper. |
| 376 | 376 |
| 377 visitNewExpression(NewExpression node) { | 377 visitNewExpression(NewExpression node) { |
| 378 Send send = node.send; | 378 Send send = node.send; |
| 379 DartType type = treeElements.getType(node); | 379 DartType type = treeElements.getType(node); |
| 380 assert(type != null); | 380 assert(type != null); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 | 633 |
| 634 visitBlock(Block node) { | 634 visitBlock(Block node) { |
| 635 for (Node statement in node.statements.nodes) { | 635 for (Node statement in node.statements.nodes) { |
| 636 if (statement is VariableDefinitions) { | 636 if (statement is VariableDefinitions) { |
| 637 makeVarDeclarationTypePlaceholder(statement); | 637 makeVarDeclarationTypePlaceholder(statement); |
| 638 } | 638 } |
| 639 } | 639 } |
| 640 node.visitChildren(this); | 640 node.visitChildren(this); |
| 641 } | 641 } |
| 642 } | 642 } |
| OLD | NEW |