| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 visitInvokeMethod(cps_ir.InvokeMethod node) { | 131 visitInvokeMethod(cps_ir.InvokeMethod node) { |
| 132 String dummy = names.name(node); | 132 String dummy = names.name(node); |
| 133 String receiver = formatReference(node.receiver); | 133 String receiver = formatReference(node.receiver); |
| 134 String callName = node.selector.name; | 134 String callName = node.selector.name; |
| 135 String args = node.arguments.map(formatReference).join(', '); | 135 String args = node.arguments.map(formatReference).join(', '); |
| 136 String kont = formatReference(node.continuation); | 136 String kont = formatReference(node.continuation); |
| 137 printStmt(dummy, | 137 printStmt(dummy, |
| 138 "InvokeMethod $receiver $callName ($args) $kont"); | 138 "InvokeMethod $receiver $callName ($args) $kont"); |
| 139 } | 139 } |
| 140 | 140 |
| 141 visitInvokeSuperMethod(cps_ir.InvokeSuperMethod node) { | 141 visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly node) { |
| 142 String dummy = names.name(node); | 142 String dummy = names.name(node); |
| 143 String receiver = formatReference(node.receiver); |
| 143 String callName = node.selector.name; | 144 String callName = node.selector.name; |
| 144 String args = node.arguments.map(formatReference).join(', '); | 145 String args = node.arguments.map(formatReference).join(', '); |
| 145 String kont = formatReference(node.continuation); | 146 String kont = formatReference(node.continuation); |
| 146 printStmt(dummy, | 147 printStmt(dummy, |
| 147 "InvokeSuperMethod $callName ($args) $kont"); | 148 "InvokeMethodDirectly $receiver $callName ($args) $kont"); |
| 148 } | 149 } |
| 149 | 150 |
| 150 visitInvokeConstructor(cps_ir.InvokeConstructor node) { | 151 visitInvokeConstructor(cps_ir.InvokeConstructor node) { |
| 151 String dummy = names.name(node); | 152 String dummy = names.name(node); |
| 152 String callName; | 153 String callName; |
| 153 if (node.target.name.isEmpty) { | 154 if (node.target.name.isEmpty) { |
| 154 callName = '${node.type}'; | 155 callName = '${node.type}'; |
| 155 } else { | 156 } else { |
| 156 callName = '${node.type}.${node.target.name}'; | 157 callName = '${node.type}.${node.target.name}'; |
| 157 } | 158 } |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 479 } |
| 479 } | 480 } |
| 480 | 481 |
| 481 visitContinuation(cps_ir.Continuation c) { | 482 visitContinuation(cps_ir.Continuation c) { |
| 482 var old_node = current_block; | 483 var old_node = current_block; |
| 483 current_block = getBlock(c); | 484 current_block = getBlock(c); |
| 484 visit(c.body); | 485 visit(c.body); |
| 485 current_block = old_node; | 486 current_block = old_node; |
| 486 } | 487 } |
| 487 } | 488 } |
| OLD | NEW |