| 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 dart2js.cps_ir.shrinking_reductions; | 5 library dart2js.cps_ir.shrinking_reductions; |
| 6 | 6 |
| 7 import 'cps_ir_nodes.dart'; | 7 import 'cps_ir_nodes.dart'; |
| 8 import 'optimizers.dart'; | 8 import 'optimizers.dart'; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 processApplyBuiltinOperator(ApplyBuiltinOperator node) { | 669 processApplyBuiltinOperator(ApplyBuiltinOperator node) { |
| 670 node.arguments.forEach((Reference ref) => ref.parent = node); | 670 node.arguments.forEach((Reference ref) => ref.parent = node); |
| 671 } | 671 } |
| 672 | 672 |
| 673 processForeignCode(ForeignCode node) { | 673 processForeignCode(ForeignCode node) { |
| 674 if (node.continuation != null) { | 674 if (node.continuation != null) { |
| 675 node.continuation.parent = node; | 675 node.continuation.parent = node; |
| 676 } | 676 } |
| 677 node.arguments.forEach((Reference ref) => ref.parent = node); | 677 node.arguments.forEach((Reference ref) => ref.parent = node); |
| 678 } | 678 } |
| 679 |
| 680 processGetLength(GetLength node) { |
| 681 node.object.parent = node; |
| 682 } |
| 683 |
| 684 processGetIndex(GetIndex node) { |
| 685 node.object.parent = node; |
| 686 node.index.parent = node; |
| 687 } |
| 688 |
| 689 processSetIndex(SetIndex node) { |
| 690 node.object.parent = node; |
| 691 node.index.parent = node; |
| 692 node.value.parent = node; |
| 693 } |
| 679 } | 694 } |
| 680 | 695 |
| 681 class _ReductionKind { | 696 class _ReductionKind { |
| 682 final String name; | 697 final String name; |
| 683 final int hashCode; | 698 final int hashCode; |
| 684 | 699 |
| 685 const _ReductionKind(this.name, this.hashCode); | 700 const _ReductionKind(this.name, this.hashCode); |
| 686 | 701 |
| 687 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); | 702 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); |
| 688 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); | 703 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 715 } | 730 } |
| 716 | 731 |
| 717 String toString() => "$kind: $node"; | 732 String toString() => "$kind: $node"; |
| 718 } | 733 } |
| 719 | 734 |
| 720 /// A dummy class used solely to mark nodes as deleted once they are removed | 735 /// A dummy class used solely to mark nodes as deleted once they are removed |
| 721 /// from a term. | 736 /// from a term. |
| 722 class _DeletedNode extends Node { | 737 class _DeletedNode extends Node { |
| 723 accept(_) => null; | 738 accept(_) => null; |
| 724 } | 739 } |
| OLD | NEW |