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

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

Issue 981523002: Integrity checker for CPS and Tree IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Stronger checks on Tree IR and update status file Created 5 years, 9 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 | Annotate | Revision Log
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.optimizers; 5 library dart2js.cps_ir.optimizers;
6 6
7 import '../constants/expressions.dart' show 7 import '../constants/expressions.dart' show
8 ConstantExpression, 8 ConstantExpression,
9 PrimitiveConstantExpression; 9 PrimitiveConstantExpression;
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 14 matching lines...) Expand all
25 part 'shrinking_reductions.dart'; 25 part 'shrinking_reductions.dart';
26 26
27 /// An optimization pass over the CPS IR. 27 /// An optimization pass over the CPS IR.
28 abstract class Pass { 28 abstract class Pass {
29 /// Applies optimizations to root, rewriting it in the process. 29 /// Applies optimizations to root, rewriting it in the process.
30 void rewrite(ExecutableDefinition root) => root.applyPass(this); 30 void rewrite(ExecutableDefinition root) => root.applyPass(this);
31 31
32 void rewriteConstructorDefinition(ConstructorDefinition root); 32 void rewriteConstructorDefinition(ConstructorDefinition root);
33 void rewriteFunctionDefinition(FunctionDefinition root); 33 void rewriteFunctionDefinition(FunctionDefinition root);
34 void rewriteFieldDefinition(FieldDefinition root); 34 void rewriteFieldDefinition(FieldDefinition root);
35
36 String get passName;
35 } 37 }
36 38
37 abstract class PassMixin implements Pass { 39 abstract class PassMixin implements Pass {
38 void rewrite(ExecutableDefinition root) => root.applyPass(this); 40 void rewrite(ExecutableDefinition root) => root.applyPass(this);
39 41
40 void rewriteExecutableDefinition(ExecutableDefinition root); 42 void rewriteExecutableDefinition(ExecutableDefinition root);
41 43
42 void rewriteFunctionDefinition(FunctionDefinition root) { 44 void rewriteFunctionDefinition(FunctionDefinition root) {
43 if (root.isAbstract) return; 45 if (root.isAbstract) return;
44 rewriteExecutableDefinition(root); 46 rewriteExecutableDefinition(root);
45 } 47 }
46 48
47 void rewriteConstructorDefinition(ConstructorDefinition root) { 49 void rewriteConstructorDefinition(ConstructorDefinition root) {
48 if (root.isAbstract) return; 50 if (root.isAbstract) return;
49 rewriteExecutableDefinition(root); 51 rewriteExecutableDefinition(root);
50 } 52 }
51 void rewriteFieldDefinition(FieldDefinition root) { 53 void rewriteFieldDefinition(FieldDefinition root) {
52 if (!root.hasInitializer) return; 54 if (!root.hasInitializer) return;
53 rewriteExecutableDefinition(root); 55 rewriteExecutableDefinition(root);
54 } 56 }
55 } 57 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/redundant_phi.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698