| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 ssa.tracer; | 5 library ssa.tracer; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show EventSink; |
| 8 EventSink; | |
| 9 | 8 |
| 10 import 'ssa.dart'; | 9 import '../compiler.dart' show Compiler; |
| 11 import '../common.dart'; | 10 import '../diagnostics/invariant.dart' show DEBUG_MODE; |
| 12 import '../compiler.dart' show | |
| 13 Compiler; | |
| 14 import '../diagnostics/invariant.dart' show | |
| 15 DEBUG_MODE; | |
| 16 import '../js_backend/js_backend.dart'; | 11 import '../js_backend/js_backend.dart'; |
| 17 import '../tracer.dart'; | 12 import '../tracer.dart'; |
| 18 | 13 |
| 14 import 'nodes.dart'; |
| 15 |
| 19 /** | 16 /** |
| 20 * Outputs SSA code in a format readable by Hydra IR. | 17 * Outputs SSA code in a format readable by Hydra IR. |
| 21 * Tracing is disabled by default, see ../tracer.dart for how | 18 * Tracing is disabled by default, see ../tracer.dart for how |
| 22 * to enable it. | 19 * to enable it. |
| 23 */ | 20 */ |
| 24 class HTracer extends HGraphVisitor with TracerUtil { | 21 class HTracer extends HGraphVisitor with TracerUtil { |
| 25 Compiler compiler; | 22 Compiler compiler; |
| 26 JavaScriptItemCompilationContext context; | 23 JavaScriptItemCompilationContext context; |
| 27 final EventSink<String> output; | 24 final EventSink<String> output; |
| 28 | 25 |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 } | 529 } |
| 533 | 530 |
| 534 String visitAwait(HAwait node) { | 531 String visitAwait(HAwait node) { |
| 535 return "await ${temporaryId(node.inputs[0])}"; | 532 return "await ${temporaryId(node.inputs[0])}"; |
| 536 } | 533 } |
| 537 | 534 |
| 538 String visitYield(HYield node) { | 535 String visitYield(HYield node) { |
| 539 return "yield${node.hasStar ? "*" : ""} ${temporaryId(node.inputs[0])}"; | 536 return "yield${node.hasStar ? "*" : ""} ${temporaryId(node.inputs[0])}"; |
| 540 } | 537 } |
| 541 } | 538 } |
| OLD | NEW |