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

Unified Diff: pkg/compiler/lib/src/cps_ir/optimizers.dart

Issue 1068243002: Overhaul tree IR visitor and rename IR classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add dummy use for RootVisitor and InitializerVisitor without arguments Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart ('k') | pkg/compiler/lib/src/cps_ir/redundant_phi.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/optimizers.dart
diff --git a/pkg/compiler/lib/src/cps_ir/optimizers.dart b/pkg/compiler/lib/src/cps_ir/optimizers.dart
index 5fba01ca3ac5d10aca16bb4ef4553e9ece53dde0..4db77c886678c5fb5f08658180dc8e8facb6647b 100644
--- a/pkg/compiler/lib/src/cps_ir/optimizers.dart
+++ b/pkg/compiler/lib/src/cps_ir/optimizers.dart
@@ -27,31 +27,7 @@ part 'shrinking_reductions.dart';
/// An optimization pass over the CPS IR.
abstract class Pass {
/// Applies optimizations to root, rewriting it in the process.
- void rewrite(ExecutableDefinition root) => root.applyPass(this);
-
- void rewriteConstructorDefinition(ConstructorDefinition root);
- void rewriteFunctionDefinition(FunctionDefinition root);
- void rewriteFieldDefinition(FieldDefinition root);
+ void rewrite(RootNode root);
String get passName;
}
-
-abstract class PassMixin implements Pass {
- void rewrite(ExecutableDefinition root) => root.applyPass(this);
-
- void rewriteExecutableDefinition(ExecutableDefinition root);
-
- void rewriteFunctionDefinition(FunctionDefinition root) {
- if (root.isAbstract) return;
- rewriteExecutableDefinition(root);
- }
-
- void rewriteConstructorDefinition(ConstructorDefinition root) {
- if (root.isAbstract) return;
- rewriteExecutableDefinition(root);
- }
- void rewriteFieldDefinition(FieldDefinition root) {
- if (!root.hasInitializer) return;
- rewriteExecutableDefinition(root);
- }
-}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_tracer.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