| 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 'ir_nodes.dart' as ir hide Function; | 9 import 'ir_nodes.dart' as ir hide Function; |
| 10 import '../tracer.dart'; | 10 import '../tracer.dart'; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 visitInvokeMethod(ir.InvokeMethod node) { | 112 visitInvokeMethod(ir.InvokeMethod node) { |
| 113 String dummy = names.name(node); | 113 String dummy = names.name(node); |
| 114 String receiver = formatReference(node.receiver); | 114 String receiver = formatReference(node.receiver); |
| 115 String callName = node.selector.name; | 115 String callName = node.selector.name; |
| 116 String args = node.arguments.map(formatReference).join(', '); | 116 String args = node.arguments.map(formatReference).join(', '); |
| 117 String kont = formatReference(node.continuation); | 117 String kont = formatReference(node.continuation); |
| 118 printStmt(dummy, | 118 printStmt(dummy, |
| 119 "InvokeMethod $receiver $callName ($args) $kont"); | 119 "InvokeMethod $receiver $callName ($args) $kont"); |
| 120 } | 120 } |
| 121 | 121 |
| 122 visitInvokeSuperMethod(ir.InvokeSuperMethod node) { |
| 123 String dummy = names.name(node); |
| 124 String callName = node.selector.name; |
| 125 String args = node.arguments.map(formatReference).join(', '); |
| 126 String kont = formatReference(node.continuation); |
| 127 printStmt(dummy, |
| 128 "InvokeSuperMethod $callName ($args) $kont"); |
| 129 } |
| 130 |
| 122 visitInvokeConstructor(ir.InvokeConstructor node) { | 131 visitInvokeConstructor(ir.InvokeConstructor node) { |
| 123 String dummy = names.name(node); | 132 String dummy = names.name(node); |
| 124 String callName; | 133 String callName; |
| 125 if (node.target.name.isEmpty) { | 134 if (node.target.name.isEmpty) { |
| 126 callName = '${node.type}'; | 135 callName = '${node.type}'; |
| 127 } else { | 136 } else { |
| 128 callName = '${node.type}.${node.target.name}'; | 137 callName = '${node.type}.${node.target.name}'; |
| 129 } | 138 } |
| 130 String args = node.arguments.map(formatReference).join(', '); | 139 String args = node.arguments.map(formatReference).join(', '); |
| 131 String kont = formatReference(node.continuation); | 140 String kont = formatReference(node.continuation); |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 } | 353 } |
| 345 } | 354 } |
| 346 | 355 |
| 347 visitContinuation(ir.Continuation c) { | 356 visitContinuation(ir.Continuation c) { |
| 348 var old_node = current_block; | 357 var old_node = current_block; |
| 349 current_block = getBlock(c); | 358 current_block = getBlock(c); |
| 350 visit(c.body); | 359 visit(c.body); |
| 351 current_block = old_node; | 360 current_block = old_node; |
| 352 } | 361 } |
| 353 } | 362 } |
| OLD | NEW |