| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 if (node.target.name.isEmpty) { | 168 if (node.target.name.isEmpty) { |
| 169 callName = '${className}'; | 169 callName = '${className}'; |
| 170 } else { | 170 } else { |
| 171 callName = '${className}.${node.target.name}'; | 171 callName = '${className}.${node.target.name}'; |
| 172 } | 172 } |
| 173 String args = node.arguments.map(formatReference).join(', '); | 173 String args = node.arguments.map(formatReference).join(', '); |
| 174 String kont = formatReference(node.continuation); | 174 String kont = formatReference(node.continuation); |
| 175 printStmt(dummy, "InvokeConstructor $callName ($args) $kont"); | 175 printStmt(dummy, "InvokeConstructor $callName ($args) $kont"); |
| 176 } | 176 } |
| 177 | 177 |
| 178 visitConcatenateStrings(cps_ir.ConcatenateStrings node) { | |
| 179 String dummy = names.name(node); | |
| 180 String args = node.arguments.map(formatReference).join(', '); | |
| 181 String kont = formatReference(node.continuation); | |
| 182 printStmt(dummy, "ConcatenateStrings ($args) $kont"); | |
| 183 } | |
| 184 | |
| 185 visitThrow(cps_ir.Throw node) { | 178 visitThrow(cps_ir.Throw node) { |
| 186 String dummy = names.name(node); | 179 String dummy = names.name(node); |
| 187 String value = formatReference(node.value); | 180 String value = formatReference(node.value); |
| 188 printStmt(dummy, "Throw $value"); | 181 printStmt(dummy, "Throw $value"); |
| 189 } | 182 } |
| 190 | 183 |
| 191 visitRethrow(cps_ir.Rethrow node) { | 184 visitRethrow(cps_ir.Rethrow node) { |
| 192 String dummy = names.name(node); | 185 String dummy = names.name(node); |
| 193 printStmt(dummy, "Rethrow"); | 186 printStmt(dummy, "Rethrow"); |
| 194 } | 187 } |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 } | 499 } |
| 507 | 500 |
| 508 visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly exp) { | 501 visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly exp) { |
| 509 addEdgeToContinuation(exp.continuation); | 502 addEdgeToContinuation(exp.continuation); |
| 510 } | 503 } |
| 511 | 504 |
| 512 visitInvokeConstructor(cps_ir.InvokeConstructor exp) { | 505 visitInvokeConstructor(cps_ir.InvokeConstructor exp) { |
| 513 addEdgeToContinuation(exp.continuation); | 506 addEdgeToContinuation(exp.continuation); |
| 514 } | 507 } |
| 515 | 508 |
| 516 visitConcatenateStrings(cps_ir.ConcatenateStrings exp) { | |
| 517 addEdgeToContinuation(exp.continuation); | |
| 518 } | |
| 519 | |
| 520 visitThrow(cps_ir.Throw exp) { | 509 visitThrow(cps_ir.Throw exp) { |
| 521 } | 510 } |
| 522 | 511 |
| 523 visitRethrow(cps_ir.Rethrow exp) { | 512 visitRethrow(cps_ir.Rethrow exp) { |
| 524 } | 513 } |
| 525 | 514 |
| 526 visitUnreachable(cps_ir.Unreachable node) { | 515 visitUnreachable(cps_ir.Unreachable node) { |
| 527 } | 516 } |
| 528 | 517 |
| 529 visitSetMutableVariable(cps_ir.SetMutableVariable exp) { | 518 visitSetMutableVariable(cps_ir.SetMutableVariable exp) { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 unexpectedNode(node); | 643 unexpectedNode(node); |
| 655 } | 644 } |
| 656 | 645 |
| 657 @override | 646 @override |
| 658 visitForeignCode(cps_ir.ForeignCode node) { | 647 visitForeignCode(cps_ir.ForeignCode node) { |
| 659 if (node.continuation != null) { | 648 if (node.continuation != null) { |
| 660 addEdgeToContinuation(node.continuation); | 649 addEdgeToContinuation(node.continuation); |
| 661 } | 650 } |
| 662 } | 651 } |
| 663 } | 652 } |
| OLD | NEW |