| 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 tree_ir_tracer; | 5 library tree_ir_tracer; |
| 6 | 6 |
| 7 import 'dart:async' show EventSink; | 7 import 'dart:async' show EventSink; |
| 8 import '../tracer.dart'; | 8 import '../tracer.dart'; |
| 9 import 'tree_ir_nodes.dart'; | 9 import 'tree_ir_nodes.dart'; |
| 10 | 10 |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 String value = visitExpression(node.value); | 580 String value = visitExpression(node.value); |
| 581 return 'SetIndex($object, $index, $value)'; | 581 return 'SetIndex($object, $index, $value)'; |
| 582 } | 582 } |
| 583 | 583 |
| 584 @override | 584 @override |
| 585 String visitAwait(Await node) { | 585 String visitAwait(Await node) { |
| 586 String value = visitExpression(node.input); | 586 String value = visitExpression(node.input); |
| 587 return 'Await($value)'; | 587 return 'Await($value)'; |
| 588 } | 588 } |
| 589 | 589 |
| 590 @override | |
| 591 String visitYield(Yield node) { | 590 String visitYield(Yield node) { |
| 592 String value = visitExpression(node.input); | 591 String value = visitExpression(node.input); |
| 593 return 'Yield($value)'; | 592 return 'Yield($value)'; |
| 594 } | 593 } |
| 595 } | 594 } |
| 596 | 595 |
| 597 /** | 596 /** |
| 598 * Invents (and remembers) names for Variables that do not have an associated | 597 * Invents (and remembers) names for Variables that do not have an associated |
| 599 * identifier. | 598 * identifier. |
| 600 * | 599 * |
| (...skipping 11 matching lines...) Expand all Loading... |
| 612 String prefix = v.element == null ? 'v' : '${v.element.name}_'; | 611 String prefix = v.element == null ? 'v' : '${v.element.name}_'; |
| 613 while (name == null || _usedNames.contains(name)) { | 612 while (name == null || _usedNames.contains(name)) { |
| 614 name = "$prefix${_counter++}"; | 613 name = "$prefix${_counter++}"; |
| 615 } | 614 } |
| 616 _names[v] = name; | 615 _names[v] = name; |
| 617 _usedNames.add(name); | 616 _usedNames.add(name); |
| 618 } | 617 } |
| 619 return name; | 618 return name; |
| 620 } | 619 } |
| 621 } | 620 } |
| OLD | NEW |