| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 entries.add("$key: $value"); | 208 entries.add("$key: $value"); |
| 209 } | 209 } |
| 210 return "LiteralMap (${entries.join(', ')})"; | 210 return "LiteralMap (${entries.join(', ')})"; |
| 211 } | 211 } |
| 212 | 212 |
| 213 visitTypeCast(cps_ir.TypeCast node) { | 213 visitTypeCast(cps_ir.TypeCast node) { |
| 214 String dummy = names.name(node); | 214 String dummy = names.name(node); |
| 215 String value = formatReference(node.value); | 215 String value = formatReference(node.value); |
| 216 String args = node.typeArguments.map(formatReference).join(', '); | 216 String args = node.typeArguments.map(formatReference).join(', '); |
| 217 String kont = formatReference(node.continuation); | 217 String kont = formatReference(node.continuation); |
| 218 printStmt(dummy, "TypeCast ($value ${node.type} ($args)) $kont"); | 218 printStmt(dummy, "TypeCast ($value ${node.dartType} ($args)) $kont"); |
| 219 } | 219 } |
| 220 | 220 |
| 221 visitInvokeContinuation(cps_ir.InvokeContinuation node) { | 221 visitInvokeContinuation(cps_ir.InvokeContinuation node) { |
| 222 String dummy = names.name(node); | 222 String dummy = names.name(node); |
| 223 String kont = formatReference(node.continuation); | 223 String kont = formatReference(node.continuation); |
| 224 String args = node.arguments.map(formatReference).join(', '); | 224 String args = node.arguments.map(formatReference).join(', '); |
| 225 printStmt(dummy, "InvokeContinuation $kont ($args)"); | 225 printStmt(dummy, "InvokeContinuation $kont ($args)"); |
| 226 } | 226 } |
| 227 | 227 |
| 228 visitBranch(cps_ir.Branch node) { | 228 visitBranch(cps_ir.Branch node) { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 } | 337 } |
| 338 | 338 |
| 339 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { | 339 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { |
| 340 String args = node.arguments.map(formatReference).join(', '); | 340 String args = node.arguments.map(formatReference).join(', '); |
| 341 return "CreateInvocationMirror(${node.selector.name}, $args)"; | 341 return "CreateInvocationMirror(${node.selector.name}, $args)"; |
| 342 } | 342 } |
| 343 | 343 |
| 344 visitTypeTest(cps_ir.TypeTest node) { | 344 visitTypeTest(cps_ir.TypeTest node) { |
| 345 String value = formatReference(node.value); | 345 String value = formatReference(node.value); |
| 346 String args = node.typeArguments.map(formatReference).join(', '); | 346 String args = node.typeArguments.map(formatReference).join(', '); |
| 347 return "TypeTest ($value ${node.type} ($args))"; | 347 return "TypeTest ($value ${node.dartType} ($args))"; |
| 348 } | 348 } |
| 349 | 349 |
| 350 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { | 350 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { |
| 351 String operator = node.operator.toString(); | 351 String operator = node.operator.toString(); |
| 352 String args = node.arguments.map(formatReference).join(', '); | 352 String args = node.arguments.map(formatReference).join(', '); |
| 353 return 'ApplyBuiltinOperator $operator ($args)'; | 353 return 'ApplyBuiltinOperator $operator ($args)'; |
| 354 } | 354 } |
| 355 | 355 |
| 356 visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) { | 356 visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) { |
| 357 String method = node.method.toString(); | 357 String method = node.method.toString(); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 | 673 |
| 674 @override | 674 @override |
| 675 visitAwait(cps_ir.Await node) { | 675 visitAwait(cps_ir.Await node) { |
| 676 unexpectedNode(node); | 676 unexpectedNode(node); |
| 677 } | 677 } |
| 678 | 678 |
| 679 visitRefinement(cps_ir.Refinement node) { | 679 visitRefinement(cps_ir.Refinement node) { |
| 680 unexpectedNode(node); | 680 unexpectedNode(node); |
| 681 } | 681 } |
| 682 } | 682 } |
| OLD | NEW |