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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 processDeclareFunction(DeclareFunction node) { | 598 processDeclareFunction(DeclareFunction node) { |
599 node.variable.parent = node; | 599 node.variable.parent = node; |
600 node.definition.parent = node; | 600 node.definition.parent = node; |
601 node.body.parent = node; | 601 node.body.parent = node; |
602 } | 602 } |
603 | 603 |
604 processThrow(Throw node) { | 604 processThrow(Throw node) { |
605 node.value.parent = node; | 605 node.value.parent = node; |
606 } | 606 } |
607 | 607 |
| 608 processGetLazyStatic(GetLazyStatic node) { |
| 609 node.continuation.parent = node; |
| 610 } |
| 611 |
608 // Definitions. | 612 // Definitions. |
609 | 613 |
610 processLiteralList(LiteralList node) { | 614 processLiteralList(LiteralList node) { |
611 node.values.forEach((Reference ref) => ref.parent = node); | 615 node.values.forEach((Reference ref) => ref.parent = node); |
612 } | 616 } |
613 | 617 |
614 processLiteralMap(LiteralMap node) { | 618 processLiteralMap(LiteralMap node) { |
615 node.entries.forEach((LiteralMapEntry entry) { | 619 node.entries.forEach((LiteralMapEntry entry) { |
616 entry.key.parent = node; | 620 entry.key.parent = node; |
617 entry.value.parent = node; | 621 entry.value.parent = node; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 } | 736 } |
733 | 737 |
734 String toString() => "$kind: $node"; | 738 String toString() => "$kind: $node"; |
735 } | 739 } |
736 | 740 |
737 /// A dummy class used solely to mark nodes as deleted once they are removed | 741 /// A dummy class used solely to mark nodes as deleted once they are removed |
738 /// from a term. | 742 /// from a term. |
739 class _DeletedNode extends Node { | 743 class _DeletedNode extends Node { |
740 accept(_) => null; | 744 accept(_) => null; |
741 } | 745 } |
OLD | NEW |