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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 } | 390 } |
391 | 391 |
392 @override | 392 @override |
393 visitAwait(cps_ir.Await node) { | 393 visitAwait(cps_ir.Await node) { |
394 String value = formatReference(node.input); | 394 String value = formatReference(node.input); |
395 String continuation = formatReference(node.continuation); | 395 String continuation = formatReference(node.continuation); |
396 return 'Await $value $continuation'; | 396 return 'Await $value $continuation'; |
397 } | 397 } |
398 | 398 |
399 @override | 399 @override |
| 400 visitYield(cps_ir.Yield node) { |
| 401 String value = formatReference(node.input); |
| 402 String continuation = formatReference(node.continuation); |
| 403 return 'Yield $value $continuation'; |
| 404 } |
| 405 |
| 406 @override |
400 visitRefinement(cps_ir.Refinement node) { | 407 visitRefinement(cps_ir.Refinement node) { |
401 String value = formatReference(node.value); | 408 String value = formatReference(node.value); |
402 return 'Refinement $value ${node.type}'; | 409 return 'Refinement $value ${node.type}'; |
403 } | 410 } |
404 } | 411 } |
405 | 412 |
406 /** | 413 /** |
407 * Invents (and remembers) names for Continuations, Parameters, etc. | 414 * Invents (and remembers) names for Continuations, Parameters, etc. |
408 * The names must match the conventions used by IR Hydra, e.g. | 415 * The names must match the conventions used by IR Hydra, e.g. |
409 * Continuations and Functions must have names of form B### since they | 416 * Continuations and Functions must have names of form B### since they |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 unexpectedNode(node); | 675 unexpectedNode(node); |
669 } | 676 } |
670 | 677 |
671 @override | 678 @override |
672 visitForeignCode(cps_ir.ForeignCode node) { | 679 visitForeignCode(cps_ir.ForeignCode node) { |
673 addEdgeToContinuation(node.continuation); | 680 addEdgeToContinuation(node.continuation); |
674 } | 681 } |
675 | 682 |
676 @override | 683 @override |
677 visitAwait(cps_ir.Await node) { | 684 visitAwait(cps_ir.Await node) { |
678 unexpectedNode(node); | 685 addEdgeToContinuation(node.continuation); |
679 } | 686 } |
680 | 687 |
| 688 @override |
| 689 visitYield(cps_ir.Yield node) { |
| 690 addEdgeToContinuation(node.continuation); |
| 691 } |
| 692 |
| 693 @override |
681 visitRefinement(cps_ir.Refinement node) { | 694 visitRefinement(cps_ir.Refinement node) { |
682 unexpectedNode(node); | 695 unexpectedNode(node); |
683 } | 696 } |
684 } | 697 } |
OLD | NEW |