| 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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 | 603 |
| 604 processContinuation(Continuation node) { | 604 processContinuation(Continuation node) { |
| 605 if (node.body != null) node.body.parent = node; | 605 if (node.body != null) node.body.parent = node; |
| 606 int index = 0; | 606 int index = 0; |
| 607 node.parameters.forEach((Parameter parameter) { | 607 node.parameters.forEach((Parameter parameter) { |
| 608 parameter.parent = node; | 608 parameter.parent = node; |
| 609 parameter.parentIndex = index++; | 609 parameter.parentIndex = index++; |
| 610 }); | 610 }); |
| 611 } | 611 } |
| 612 | 612 |
| 613 processIsTrue(IsTrue node) { | |
| 614 node.value.parent = node; | |
| 615 } | |
| 616 | |
| 617 processInterceptor(Interceptor node) { | 613 processInterceptor(Interceptor node) { |
| 618 node.input.parent = node; | 614 node.input.parent = node; |
| 619 } | 615 } |
| 620 | 616 |
| 621 processSetField(SetField node) { | 617 processSetField(SetField node) { |
| 622 node.object.parent = node; | 618 node.object.parent = node; |
| 623 node.value.parent = node; | 619 node.value.parent = node; |
| 624 } | 620 } |
| 625 | 621 |
| 626 processGetField(GetField node) { | 622 processGetField(GetField node) { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 } | 732 } |
| 737 | 733 |
| 738 String toString() => "$kind: $node"; | 734 String toString() => "$kind: $node"; |
| 739 } | 735 } |
| 740 | 736 |
| 741 /// A dummy class used solely to mark nodes as deleted once they are removed | 737 /// A dummy class used solely to mark nodes as deleted once they are removed |
| 742 /// from a term. | 738 /// from a term. |
| 743 class _DeletedNode extends Node { | 739 class _DeletedNode extends Node { |
| 744 accept(_) => null; | 740 accept(_) => null; |
| 745 } | 741 } |
| OLD | NEW |