Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart

Issue 1353843002: dart2js cps: Support sync* and yield. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 690 }
691 691
692 processAwait(Await node) { 692 processAwait(Await node) {
693 node.continuation.parent = node; 693 node.continuation.parent = node;
694 node.input.parent = node; 694 node.input.parent = node;
695 } 695 }
696 696
697 processRefinement(Refinement node) { 697 processRefinement(Refinement node) {
698 node.value.parent = node; 698 node.value.parent = node;
699 } 699 }
700
701 processYield(Yield node) {
702 node.continuation.parent = node;
703 node.input.parent = node;
704 }
700 } 705 }
701 706
702 class _ReductionKind { 707 class _ReductionKind {
703 final String name; 708 final String name;
704 final int hashCode; 709 final int hashCode;
705 710
706 const _ReductionKind(this.name, this.hashCode); 711 const _ReductionKind(this.name, this.hashCode);
707 712
708 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); 713 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0);
709 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); 714 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1);
(...skipping 26 matching lines...) Expand all
736 } 741 }
737 742
738 String toString() => "$kind: $node"; 743 String toString() => "$kind: $node";
739 } 744 }
740 745
741 /// A dummy class used solely to mark nodes as deleted once they are removed 746 /// A dummy class used solely to mark nodes as deleted once they are removed
742 /// from a term. 747 /// from a term.
743 class _DeletedNode extends Node { 748 class _DeletedNode extends Node {
744 accept(_) => null; 749 accept(_) => null;
745 } 750 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698