| 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 String args = node.typeArguments.map(formatReference).join(', '); | 349 String args = node.typeArguments.map(formatReference).join(', '); |
| 350 return "TypeTest ($value ${node.type} ($args))"; | 350 return "TypeTest ($value ${node.type} ($args))"; |
| 351 } | 351 } |
| 352 | 352 |
| 353 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { | 353 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { |
| 354 String operator = node.operator.toString(); | 354 String operator = node.operator.toString(); |
| 355 String args = node.arguments.map(formatReference).join(', '); | 355 String args = node.arguments.map(formatReference).join(', '); |
| 356 return 'ApplyBuiltinOperator $operator ($args)'; | 356 return 'ApplyBuiltinOperator $operator ($args)'; |
| 357 } | 357 } |
| 358 | 358 |
| 359 visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) { |
| 360 String method = node.method.toString(); |
| 361 String receiver = formatReference(node.receiver); |
| 362 String args = node.arguments.map(formatReference).join(', '); |
| 363 return 'ApplyBuiltinMethod $method $receiver ($args)'; |
| 364 } |
| 365 |
| 359 @override | 366 @override |
| 360 visitForeignCode(cps_ir.ForeignCode node) { | 367 visitForeignCode(cps_ir.ForeignCode node) { |
| 361 String id = names.name(node); | 368 String id = names.name(node); |
| 362 String arguments = node.arguments.map(formatReference).join(', '); | 369 String arguments = node.arguments.map(formatReference).join(', '); |
| 363 String continuation = formatReference(node.continuation); | 370 String continuation = formatReference(node.continuation); |
| 364 printStmt(id, "ForeignCode ${node.type} ${node.codeTemplate.source} " | 371 printStmt(id, "ForeignCode ${node.type} ${node.codeTemplate.source} " |
| 365 "$arguments $continuation"); | 372 "$arguments $continuation"); |
| 366 } | 373 } |
| 367 | 374 |
| 368 visitGetLength(cps_ir.GetLength node) { | 375 visitGetLength(cps_ir.GetLength node) { |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 } | 632 } |
| 626 | 633 |
| 627 visitTypeTest(cps_ir.TypeTest node) { | 634 visitTypeTest(cps_ir.TypeTest node) { |
| 628 unexpectedNode(node); | 635 unexpectedNode(node); |
| 629 } | 636 } |
| 630 | 637 |
| 631 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { | 638 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { |
| 632 unexpectedNode(node); | 639 unexpectedNode(node); |
| 633 } | 640 } |
| 634 | 641 |
| 642 visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) { |
| 643 unexpectedNode(node); |
| 644 } |
| 645 |
| 635 visitGetLength(cps_ir.GetLength node) { | 646 visitGetLength(cps_ir.GetLength node) { |
| 636 unexpectedNode(node); | 647 unexpectedNode(node); |
| 637 } | 648 } |
| 638 | 649 |
| 639 visitGetIndex(cps_ir.GetIndex node) { | 650 visitGetIndex(cps_ir.GetIndex node) { |
| 640 unexpectedNode(node); | 651 unexpectedNode(node); |
| 641 } | 652 } |
| 642 | 653 |
| 643 visitSetIndex(cps_ir.SetIndex node) { | 654 visitSetIndex(cps_ir.SetIndex node) { |
| 644 unexpectedNode(node); | 655 unexpectedNode(node); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 659 @override | 670 @override |
| 660 visitForeignCode(cps_ir.ForeignCode node) { | 671 visitForeignCode(cps_ir.ForeignCode node) { |
| 661 addEdgeToContinuation(node.continuation); | 672 addEdgeToContinuation(node.continuation); |
| 662 } | 673 } |
| 663 | 674 |
| 664 @override | 675 @override |
| 665 visitAwait(cps_ir.Await node) { | 676 visitAwait(cps_ir.Await node) { |
| 666 unexpectedNode(node); | 677 unexpectedNode(node); |
| 667 } | 678 } |
| 668 } | 679 } |
| OLD | NEW |