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_tracer; | 5 library dart2js.ir_tracer; |
6 | 6 |
7 import 'dart:async' show EventSink; | 7 import 'dart:async' show EventSink; |
8 | 8 |
9 import 'cps_ir_nodes.dart' as cps_ir hide Function; | 9 import 'cps_ir_nodes.dart' as cps_ir hide Function; |
10 import '../tracer.dart'; | 10 import '../tracer.dart'; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 if (target is cps_ir.Continuation && target.isReturnContinuation) { | 207 if (target is cps_ir.Continuation && target.isReturnContinuation) { |
208 return "return"; // Do not generate a name for the return continuation | 208 return "return"; // Do not generate a name for the return continuation |
209 } else { | 209 } else { |
210 return names.name(ref.definition); | 210 return names.name(ref.definition); |
211 } | 211 } |
212 } | 212 } |
213 | 213 |
214 String formatPrimitive(cps_ir.Primitive p) => visit(p); | 214 String formatPrimitive(cps_ir.Primitive p) => visit(p); |
215 | 215 |
216 visitConstant(cps_ir.Constant node) { | 216 visitConstant(cps_ir.Constant node) { |
217 return "Constant ${node.expression.value}"; | 217 return "Constant ${node.expression.value.toStructuredString()}"; |
218 } | 218 } |
219 | 219 |
220 visitParameter(cps_ir.Parameter node) { | 220 visitParameter(cps_ir.Parameter node) { |
221 return "Parameter ${names.name(node)}"; | 221 return "Parameter ${names.name(node)}"; |
222 } | 222 } |
223 | 223 |
224 visitContinuation(cps_ir.Continuation node) { | 224 visitContinuation(cps_ir.Continuation node) { |
225 return "Continuation ${names.name(node)}"; | 225 return "Continuation ${names.name(node)}"; |
226 } | 226 } |
227 | 227 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 } | 383 } |
384 } | 384 } |
385 | 385 |
386 visitContinuation(cps_ir.Continuation c) { | 386 visitContinuation(cps_ir.Continuation c) { |
387 var old_node = current_block; | 387 var old_node = current_block; |
388 current_block = getBlock(c); | 388 current_block = getBlock(c); |
389 visit(c.body); | 389 visit(c.body); |
390 current_block = old_node; | 390 current_block = old_node; |
391 } | 391 } |
392 } | 392 } |
OLD | NEW |