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

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

Issue 1253333002: dart2js cps: Support async/await by rewriting the JavaScript AST. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rewrite to switch. Created 5 years, 4 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 processGetIndex(GetIndex node) { 680 processGetIndex(GetIndex node) {
681 node.object.parent = node; 681 node.object.parent = node;
682 node.index.parent = node; 682 node.index.parent = node;
683 } 683 }
684 684
685 processSetIndex(SetIndex node) { 685 processSetIndex(SetIndex node) {
686 node.object.parent = node; 686 node.object.parent = node;
687 node.index.parent = node; 687 node.index.parent = node;
688 node.value.parent = node; 688 node.value.parent = node;
689 } 689 }
690
691 processAwait(Await node) {
692 node.continuation.parent = node;
693 node.input.parent = node;
694 }
690 } 695 }
691 696
692 class _ReductionKind { 697 class _ReductionKind {
693 final String name; 698 final String name;
694 final int hashCode; 699 final int hashCode;
695 700
696 const _ReductionKind(this.name, this.hashCode); 701 const _ReductionKind(this.name, this.hashCode);
697 702
698 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); 703 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0);
699 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); 704 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1);
(...skipping 26 matching lines...) Expand all
726 } 731 }
727 732
728 String toString() => "$kind: $node"; 733 String toString() => "$kind: $node";
729 } 734 }
730 735
731 /// A dummy class used solely to mark nodes as deleted once they are removed 736 /// A dummy class used solely to mark nodes as deleted once they are removed
732 /// from a term. 737 /// from a term.
733 class _DeletedNode extends Node { 738 class _DeletedNode extends Node {
734 accept(_) => null; 739 accept(_) => null;
735 } 740 }
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