| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 String index = formatReference(node.index); | 375 String index = formatReference(node.index); |
| 376 return 'GetIndex $object $index'; | 376 return 'GetIndex $object $index'; |
| 377 } | 377 } |
| 378 | 378 |
| 379 visitSetIndex(cps_ir.SetIndex node) { | 379 visitSetIndex(cps_ir.SetIndex node) { |
| 380 String object = formatReference(node.object); | 380 String object = formatReference(node.object); |
| 381 String index = formatReference(node.index); | 381 String index = formatReference(node.index); |
| 382 String value = formatReference(node.value); | 382 String value = formatReference(node.value); |
| 383 return 'SetIndex $object $index $value'; | 383 return 'SetIndex $object $index $value'; |
| 384 } | 384 } |
| 385 |
| 386 @override |
| 387 visitAwait(cps_ir.Await node) { |
| 388 String value = formatReference(node.input); |
| 389 String continuation = formatReference(node.continuation); |
| 390 return 'Await $value $continuation'; |
| 391 } |
| 385 } | 392 } |
| 386 | 393 |
| 387 /** | 394 /** |
| 388 * Invents (and remembers) names for Continuations, Parameters, etc. | 395 * Invents (and remembers) names for Continuations, Parameters, etc. |
| 389 * The names must match the conventions used by IR Hydra, e.g. | 396 * The names must match the conventions used by IR Hydra, e.g. |
| 390 * Continuations and Functions must have names of form B### since they | 397 * Continuations and Functions must have names of form B### since they |
| 391 * are visualized as basic blocks. | 398 * are visualized as basic blocks. |
| 392 */ | 399 */ |
| 393 class Names { | 400 class Names { |
| 394 final Map<Object, String> names = {}; | 401 final Map<Object, String> names = {}; |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 } | 653 } |
| 647 | 654 |
| 648 visitSetStatic(cps_ir.SetStatic node) { | 655 visitSetStatic(cps_ir.SetStatic node) { |
| 649 unexpectedNode(node); | 656 unexpectedNode(node); |
| 650 } | 657 } |
| 651 | 658 |
| 652 @override | 659 @override |
| 653 visitForeignCode(cps_ir.ForeignCode node) { | 660 visitForeignCode(cps_ir.ForeignCode node) { |
| 654 addEdgeToContinuation(node.continuation); | 661 addEdgeToContinuation(node.continuation); |
| 655 } | 662 } |
| 663 |
| 664 @override |
| 665 visitAwait(cps_ir.Await node) { |
| 666 unexpectedNode(node); |
| 667 } |
| 656 } | 668 } |
| OLD | NEW |