| 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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 processGetMutableVariable(GetMutableVariable node) { | 652 processGetMutableVariable(GetMutableVariable node) { |
| 653 node.variable.parent = node; | 653 node.variable.parent = node; |
| 654 } | 654 } |
| 655 | 655 |
| 656 processCreateInstance(CreateInstance node) { | 656 processCreateInstance(CreateInstance node) { |
| 657 node.arguments.forEach((Reference ref) => ref.parent = node); | 657 node.arguments.forEach((Reference ref) => ref.parent = node); |
| 658 } | 658 } |
| 659 | 659 |
| 660 processCreateBox(CreateBox node) { | 660 processCreateBox(CreateBox node) { |
| 661 } | 661 } |
| 662 |
| 663 processReifyRuntimeType(ReifyRuntimeType node) { |
| 664 node.value.parent = node; |
| 665 } |
| 666 |
| 667 processReadTypeVariable(ReadTypeVariable node) { |
| 668 node.target.parent = node; |
| 669 } |
| 662 } | 670 } |
| 663 | 671 |
| 664 class _ReductionKind { | 672 class _ReductionKind { |
| 665 final String name; | 673 final String name; |
| 666 final int hashCode; | 674 final int hashCode; |
| 667 | 675 |
| 668 const _ReductionKind(this.name, this.hashCode); | 676 const _ReductionKind(this.name, this.hashCode); |
| 669 | 677 |
| 670 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); | 678 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); |
| 671 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); | 679 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 698 } | 706 } |
| 699 | 707 |
| 700 String toString() => "$kind: $node"; | 708 String toString() => "$kind: $node"; |
| 701 } | 709 } |
| 702 | 710 |
| 703 /// A dummy class used solely to mark nodes as deleted once they are removed | 711 /// A dummy class used solely to mark nodes as deleted once they are removed |
| 704 /// from a term. | 712 /// from a term. |
| 705 class _DeletedNode extends Node { | 713 class _DeletedNode extends Node { |
| 706 accept(_) => null; | 714 accept(_) => null; |
| 707 } | 715 } |
| OLD | NEW |