OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library dart2js.ir_nodes_sexpr; | 5 library dart2js.ir_nodes_sexpr; |
6 | 6 |
7 import '../constants/values.dart'; | 7 import '../constants/values.dart'; |
8 import '../util/util.dart'; | 8 import '../util/util.dart'; |
9 import 'cps_ir_nodes.dart'; | 9 import 'cps_ir_nodes.dart'; |
10 | 10 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 if (node.target.name.isEmpty) { | 166 if (node.target.name.isEmpty) { |
167 callName = '${className}'; | 167 callName = '${className}'; |
168 } else { | 168 } else { |
169 callName = '${className}.${node.target.name}'; | 169 callName = '${className}.${node.target.name}'; |
170 } | 170 } |
171 String cont = access(node.continuation); | 171 String cont = access(node.continuation); |
172 String args = formatArguments(node); | 172 String args = formatArguments(node); |
173 return '$indentation(InvokeConstructor $callName $args $cont)'; | 173 return '$indentation(InvokeConstructor $callName $args $cont)'; |
174 } | 174 } |
175 | 175 |
| 176 String visitConcatenateStrings(ConcatenateStrings node) { |
| 177 String cont = access(node.continuation); |
| 178 String args = node.arguments.map(access).join(' '); |
| 179 return '$indentation(ConcatenateStrings ($args) $cont)'; |
| 180 } |
| 181 |
176 String visitInvokeContinuation(InvokeContinuation node) { | 182 String visitInvokeContinuation(InvokeContinuation node) { |
177 String name = access(node.continuation); | 183 String name = access(node.continuation); |
178 if (node.isRecursive) name = 'rec $name'; | 184 if (node.isRecursive) name = 'rec $name'; |
179 String args = node.arguments.map(access).join(' '); | 185 String args = node.arguments.map(access).join(' '); |
180 return '$indentation(InvokeContinuation $name ($args))'; | 186 return '$indentation(InvokeContinuation $name ($args))'; |
181 } | 187 } |
182 | 188 |
183 String visitThrow(Throw node) { | 189 String visitThrow(Throw node) { |
184 String value = access(node.value); | 190 String value = access(node.value); |
185 return '$indentation(Throw $value)'; | 191 return '$indentation(Throw $value)'; |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 void setReturnContinuation(Continuation node) { | 459 void setReturnContinuation(Continuation node) { |
454 assert(!_names.containsKey(node) || _names[node] == 'return'); | 460 assert(!_names.containsKey(node) || _names[node] == 'return'); |
455 _names[node] = 'return'; | 461 _names[node] = 'return'; |
456 } | 462 } |
457 | 463 |
458 String getName(Node node) { | 464 String getName(Node node) { |
459 if (!_names.containsKey(node)) return 'MISSING_NAME'; | 465 if (!_names.containsKey(node)) return 'MISSING_NAME'; |
460 return _names[node]; | 466 return _names[node]; |
461 } | 467 } |
462 } | 468 } |
OLD | NEW |