| Index: pkg/compiler/lib/src/tree_ir/optimization/optimization.dart
|
| diff --git a/pkg/compiler/lib/src/tree_ir/optimization/optimization.dart b/pkg/compiler/lib/src/tree_ir/optimization/optimization.dart
|
| index 1b66614b563f6fe0cd6554521b177b1594227747..7dae5cdfb87475708f186dc9d349fbc337613ab8 100644
|
| --- a/pkg/compiler/lib/src/tree_ir/optimization/optimization.dart
|
| +++ b/pkg/compiler/lib/src/tree_ir/optimization/optimization.dart
|
| @@ -1,7 +1,6 @@
|
| library tree_ir.optimization;
|
|
|
| import '../tree_ir_nodes.dart';
|
| -import '../../elements/elements.dart';
|
| import '../../constants/values.dart' as values;
|
| import 'variable_merger.dart';
|
|
|
| @@ -14,29 +13,7 @@ part 'statement_rewriter.dart';
|
| /// An optimization pass over the Tree IR.
|
| abstract class Pass {
|
| /// Applies optimizations to root, rewriting it in the process.
|
| - void rewrite(ExecutableDefinition root) => root.applyPass(this);
|
| - void rewriteFieldDefinition(FieldDefinition root);
|
| - void rewriteFunctionDefinition(FunctionDefinition root);
|
| - void rewriteConstructorDefinition(ConstructorDefinition 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 rewriteFieldDefinition(FieldDefinition root) {
|
| - if (!root.hasInitializer) return;
|
| - rewriteExecutableDefinition(root);
|
| - }
|
| - void rewriteFunctionDefinition(FunctionDefinition root) {
|
| - if (root.isAbstract) return;
|
| - rewriteExecutableDefinition(root);
|
| - }
|
| - void rewriteConstructorDefinition(ConstructorDefinition root) {
|
| - if (root.isAbstract) return;
|
| - rewriteExecutableDefinition(root);
|
| - }
|
| -}
|
| -
|
|
|