| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 String value = formatReference(node.value); | 386 String value = formatReference(node.value); |
| 387 return 'SetIndex $object $index $value'; | 387 return 'SetIndex $object $index $value'; |
| 388 } | 388 } |
| 389 | 389 |
| 390 @override | 390 @override |
| 391 visitAwait(cps_ir.Await node) { | 391 visitAwait(cps_ir.Await node) { |
| 392 String value = formatReference(node.input); | 392 String value = formatReference(node.input); |
| 393 String continuation = formatReference(node.continuation); | 393 String continuation = formatReference(node.continuation); |
| 394 return 'Await $value $continuation'; | 394 return 'Await $value $continuation'; |
| 395 } | 395 } |
| 396 |
| 397 @override |
| 398 visitRefinement(cps_ir.Refinement node) { |
| 399 String value = formatReference(node.value); |
| 400 return 'Refinement $value ${node.type}'; |
| 401 } |
| 396 } | 402 } |
| 397 | 403 |
| 398 /** | 404 /** |
| 399 * Invents (and remembers) names for Continuations, Parameters, etc. | 405 * Invents (and remembers) names for Continuations, Parameters, etc. |
| 400 * The names must match the conventions used by IR Hydra, e.g. | 406 * The names must match the conventions used by IR Hydra, e.g. |
| 401 * Continuations and Functions must have names of form B### since they | 407 * Continuations and Functions must have names of form B### since they |
| 402 * are visualized as basic blocks. | 408 * are visualized as basic blocks. |
| 403 */ | 409 */ |
| 404 class Names { | 410 class Names { |
| 405 final Map<Object, String> names = {}; | 411 final Map<Object, String> names = {}; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 | 668 |
| 663 @override | 669 @override |
| 664 visitForeignCode(cps_ir.ForeignCode node) { | 670 visitForeignCode(cps_ir.ForeignCode node) { |
| 665 addEdgeToContinuation(node.continuation); | 671 addEdgeToContinuation(node.continuation); |
| 666 } | 672 } |
| 667 | 673 |
| 668 @override | 674 @override |
| 669 visitAwait(cps_ir.Await node) { | 675 visitAwait(cps_ir.Await node) { |
| 670 unexpectedNode(node); | 676 unexpectedNode(node); |
| 671 } | 677 } |
| 678 |
| 679 visitRefinement(cps_ir.Refinement node) { |
| 680 unexpectedNode(node); |
| 681 } |
| 672 } | 682 } |
| OLD | NEW |