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