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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 node.continuation.parent = node; | 555 node.continuation.parent = node; |
556 node.arguments.forEach((Reference ref) => ref.parent = node); | 556 node.arguments.forEach((Reference ref) => ref.parent = node); |
557 } | 557 } |
558 | 558 |
559 processBranch(Branch node) { | 559 processBranch(Branch node) { |
560 node.condition.parent = node; | 560 node.condition.parent = node; |
561 node.trueContinuation.parent = node; | 561 node.trueContinuation.parent = node; |
562 node.falseContinuation.parent = node; | 562 node.falseContinuation.parent = node; |
563 } | 563 } |
564 | 564 |
565 processTypeOperator(TypeOperator node) { | 565 processTypeCast(TypeCast node) { |
566 node.typeArguments.forEach((Reference ref) => ref.parent = node); | 566 node.typeArguments.forEach((Reference ref) => ref.parent = node); |
567 node.continuation.parent = node; | 567 node.continuation.parent = node; |
568 node.value.parent = node; | 568 node.value.parent = node; |
569 } | 569 } |
570 | 570 |
| 571 processTypeTest(TypeTest node) { |
| 572 node.typeArguments.forEach((Reference ref) => ref.parent = node); |
| 573 node.value.parent = node; |
| 574 } |
| 575 |
571 processSetMutableVariable(SetMutableVariable node) { | 576 processSetMutableVariable(SetMutableVariable node) { |
572 node.variable.parent = node; | 577 node.variable.parent = node; |
573 node.body.parent = node; | 578 node.body.parent = node; |
574 node.value.parent = node; | 579 node.value.parent = node; |
575 } | 580 } |
576 | 581 |
577 processThrow(Throw node) { | 582 processThrow(Throw node) { |
578 node.value.parent = node; | 583 node.value.parent = node; |
579 } | 584 } |
580 | 585 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 } | 708 } |
704 | 709 |
705 String toString() => "$kind: $node"; | 710 String toString() => "$kind: $node"; |
706 } | 711 } |
707 | 712 |
708 /// A dummy class used solely to mark nodes as deleted once they are removed | 713 /// A dummy class used solely to mark nodes as deleted once they are removed |
709 /// from a term. | 714 /// from a term. |
710 class _DeletedNode extends Node { | 715 class _DeletedNode extends Node { |
711 accept(_) => null; | 716 accept(_) => null; |
712 } | 717 } |
OLD | NEW |