| 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 resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 Element operator[](Node node); | 8 Element operator[](Node node); |
| 9 Selector getSelector(Send send); | 9 Selector getSelector(Send send); |
| 10 Selector getGetterSelectorInComplexSendSet(SendSet node); | 10 Selector getGetterSelectorInComplexSendSet(SendSet node); |
| (...skipping 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2583 } | 2583 } |
| 2584 return type; | 2584 return type; |
| 2585 } | 2585 } |
| 2586 | 2586 |
| 2587 visitModifiers(Modifiers node) { | 2587 visitModifiers(Modifiers node) { |
| 2588 // TODO(ngeoffray): Implement this. | 2588 // TODO(ngeoffray): Implement this. |
| 2589 unimplemented(node, 'modifiers'); | 2589 unimplemented(node, 'modifiers'); |
| 2590 } | 2590 } |
| 2591 | 2591 |
| 2592 visitLiteralList(LiteralList node) { | 2592 visitLiteralList(LiteralList node) { |
| 2593 world.registerInstantiatedClass(compiler.listClass); | |
| 2594 NodeList arguments = node.typeArguments; | 2593 NodeList arguments = node.typeArguments; |
| 2594 Link<DartType> typeArguments = new Link<DartType>(); |
| 2595 if (arguments != null) { | 2595 if (arguments != null) { |
| 2596 Link<Node> nodes = arguments.nodes; | 2596 Link<Node> nodes = arguments.nodes; |
| 2597 if (nodes.isEmpty) { | 2597 if (nodes.isEmpty) { |
| 2598 error(arguments, MessageKind.MISSING_TYPE_ARGUMENT); | 2598 error(arguments, MessageKind.MISSING_TYPE_ARGUMENT); |
| 2599 } else { | 2599 } else { |
| 2600 resolveTypeRequired(nodes.head); | 2600 typeArguments = typeArguments.prepend(resolveTypeRequired(nodes.head)); |
| 2601 for (nodes = nodes.tail; !nodes.isEmpty; nodes = nodes.tail) { | 2601 for (nodes = nodes.tail; !nodes.isEmpty; nodes = nodes.tail) { |
| 2602 error(nodes.head, MessageKind.ADDITIONAL_TYPE_ARGUMENT); | 2602 error(nodes.head, MessageKind.ADDITIONAL_TYPE_ARGUMENT); |
| 2603 resolveTypeRequired(nodes.head); | 2603 resolveTypeRequired(nodes.head); |
| 2604 } | 2604 } |
| 2605 } | 2605 } |
| 2606 } | 2606 } |
| 2607 DartType listType = new InterfaceType(compiler.listClass, typeArguments); |
| 2608 world.registerInstantiatedType(listType); |
| 2607 visit(node.elements); | 2609 visit(node.elements); |
| 2608 } | 2610 } |
| 2609 | 2611 |
| 2610 visitConditional(Conditional node) { | 2612 visitConditional(Conditional node) { |
| 2611 node.visitChildren(this); | 2613 node.visitChildren(this); |
| 2612 } | 2614 } |
| 2613 | 2615 |
| 2614 visitStringInterpolation(StringInterpolation node) { | 2616 visitStringInterpolation(StringInterpolation node) { |
| 2615 world.registerInstantiatedClass(compiler.stringClass); | 2617 world.registerInstantiatedClass(compiler.stringClass); |
| 2616 compiler.backend.registerStringInterpolation(); | 2618 compiler.backend.registerStringInterpolation(); |
| (...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3807 return e; | 3809 return e; |
| 3808 } | 3810 } |
| 3809 | 3811 |
| 3810 /// Assumed to be called by [resolveRedirectingFactory]. | 3812 /// Assumed to be called by [resolveRedirectingFactory]. |
| 3811 Element visitReturn(Return node) { | 3813 Element visitReturn(Return node) { |
| 3812 Node expression = node.expression; | 3814 Node expression = node.expression; |
| 3813 return finishConstructorReference(visit(expression), | 3815 return finishConstructorReference(visit(expression), |
| 3814 expression, expression); | 3816 expression, expression); |
| 3815 } | 3817 } |
| 3816 } | 3818 } |
| OLD | NEW |