Chromium Code Reviews| 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 interface TreeElements { | 5 interface TreeElements { |
| 6 Element operator[](Node node); | 6 Element operator[](Node node); |
| 7 Selector getSelector(Send send); | 7 Selector getSelector(Send send); |
| 8 } | 8 } |
| 9 | 9 |
| 10 class TreeElementMapping implements TreeElements { | 10 class TreeElementMapping implements TreeElements { |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 910 | 910 |
| 911 visitLiteralBool(LiteralBool node) { | 911 visitLiteralBool(LiteralBool node) { |
| 912 } | 912 } |
| 913 | 913 |
| 914 visitLiteralString(LiteralString node) { | 914 visitLiteralString(LiteralString node) { |
| 915 } | 915 } |
| 916 | 916 |
| 917 visitLiteralNull(LiteralNull node) { | 917 visitLiteralNull(LiteralNull node) { |
| 918 } | 918 } |
| 919 | 919 |
| 920 visitStringJuxtaposition(StringJuxtaposition node) { | |
| 921 if (node.isInterpolation) node.visitChildren(this); | |
|
ahe
2012/03/19 15:53:06
Is "if (node.isInterpolation)" a "premature" optim
Lasse Reichstein Nielsen
2012/03/20 09:34:33
Yes.
All optimizations not backed by measurement a
| |
| 922 } | |
| 923 | |
| 920 visitNodeList(NodeList node) { | 924 visitNodeList(NodeList node) { |
| 921 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { | 925 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { |
| 922 visit(link.head); | 926 visit(link.head); |
| 923 } | 927 } |
| 924 } | 928 } |
| 925 | 929 |
| 926 visitOperator(Operator node) { | 930 visitOperator(Operator node) { |
| 927 unimplemented(node, 'operator'); | 931 unimplemented(node, 'operator'); |
| 928 } | 932 } |
| 929 | 933 |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1750 | 1754 |
| 1751 TopScope(LibraryElement library) : super(null, library); | 1755 TopScope(LibraryElement library) : super(null, library); |
| 1752 Element lookup(SourceString name) { | 1756 Element lookup(SourceString name) { |
| 1753 return library.find(name); | 1757 return library.find(name); |
| 1754 } | 1758 } |
| 1755 | 1759 |
| 1756 Element add(Element element) { | 1760 Element add(Element element) { |
| 1757 throw "Cannot add an element in the top scope"; | 1761 throw "Cannot add an element in the top scope"; |
| 1758 } | 1762 } |
| 1759 } | 1763 } |
| OLD | NEW |