| 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 part of dart2js.cps_ir.optimizers; | 5 part of dart2js.cps_ir.optimizers; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * [ShrinkingReducer] applies shrinking reductions to CPS terms as described | 8 * [ShrinkingReducer] applies shrinking reductions to CPS terms as described |
| 9 * in 'Compiling with Continuations, Continued' by Andrew Kennedy. | 9 * in 'Compiling with Continuations, Continued' by Andrew Kennedy. |
| 10 */ | 10 */ |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 node.value.parent = node; | 674 node.value.parent = node; |
| 675 } | 675 } |
| 676 | 676 |
| 677 processReadTypeVariable(ReadTypeVariable node) { | 677 processReadTypeVariable(ReadTypeVariable node) { |
| 678 node.target.parent = node; | 678 node.target.parent = node; |
| 679 } | 679 } |
| 680 | 680 |
| 681 processTypeExpression(TypeExpression node) { | 681 processTypeExpression(TypeExpression node) { |
| 682 node.arguments.forEach((Reference ref) => ref.parent = node); | 682 node.arguments.forEach((Reference ref) => ref.parent = node); |
| 683 } | 683 } |
| 684 |
| 685 processCreateInvocationMirror(CreateInvocationMirror node) { |
| 686 node.arguments.forEach((Reference ref) => ref.parent = node); |
| 687 } |
| 684 } | 688 } |
| 685 | 689 |
| 686 class _ReductionKind { | 690 class _ReductionKind { |
| 687 final String name; | 691 final String name; |
| 688 final int hashCode; | 692 final int hashCode; |
| 689 | 693 |
| 690 const _ReductionKind(this.name, this.hashCode); | 694 const _ReductionKind(this.name, this.hashCode); |
| 691 | 695 |
| 692 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); | 696 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); |
| 693 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); | 697 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 720 } | 724 } |
| 721 | 725 |
| 722 String toString() => "$kind: $node"; | 726 String toString() => "$kind: $node"; |
| 723 } | 727 } |
| 724 | 728 |
| 725 /// A dummy class used solely to mark nodes as deleted once they are removed | 729 /// A dummy class used solely to mark nodes as deleted once they are removed |
| 726 /// from a term. | 730 /// from a term. |
| 727 class _DeletedNode extends Node { | 731 class _DeletedNode extends Node { |
| 728 accept(_) => null; | 732 accept(_) => null; |
| 729 } | 733 } |
| OLD | NEW |