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 import 'cps_ir_nodes.dart' as cps_ir hide Function; | 8 import 'cps_ir_nodes.dart' as cps_ir hide Function; |
9 import '../tracer.dart'; | 9 import '../tracer.dart'; |
10 | 10 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 if (target is cps_ir.Continuation && target.isReturnContinuation) { | 247 if (target is cps_ir.Continuation && target.isReturnContinuation) { |
248 return "return"; // Do not generate a name for the return continuation | 248 return "return"; // Do not generate a name for the return continuation |
249 } else { | 249 } else { |
250 return names.name(ref.definition); | 250 return names.name(ref.definition); |
251 } | 251 } |
252 } | 252 } |
253 | 253 |
254 String formatPrimitive(cps_ir.Primitive p) => visit(p); | 254 String formatPrimitive(cps_ir.Primitive p) => visit(p); |
255 | 255 |
256 visitConstant(cps_ir.Constant node) { | 256 visitConstant(cps_ir.Constant node) { |
257 return "Constant ${node.expression.value.toStructuredString()}"; | 257 return "Constant ${node.value.toStructuredString()}"; |
258 } | 258 } |
259 | 259 |
260 visitParameter(cps_ir.Parameter node) { | 260 visitParameter(cps_ir.Parameter node) { |
261 return "Parameter ${names.name(node)}"; | 261 return "Parameter ${names.name(node)}"; |
262 } | 262 } |
263 | 263 |
264 visitMutableVariable(cps_ir.MutableVariable node) { | 264 visitMutableVariable(cps_ir.MutableVariable node) { |
265 return "MutableVariable ${names.name(node)}"; | 265 return "MutableVariable ${names.name(node)}"; |
266 } | 266 } |
267 | 267 |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 } | 597 } |
598 | 598 |
599 visitNonTailThrow(cps_ir.NonTailThrow node) { | 599 visitNonTailThrow(cps_ir.NonTailThrow node) { |
600 unexpectedNode(node); | 600 unexpectedNode(node); |
601 } | 601 } |
602 | 602 |
603 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { | 603 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { |
604 unexpectedNode(node); | 604 unexpectedNode(node); |
605 } | 605 } |
606 } | 606 } |
OLD | NEW |