Index: pkg/compiler/lib/src/cps_ir/redundant_phi.dart |
diff --git a/pkg/compiler/lib/src/cps_ir/redundant_phi.dart b/pkg/compiler/lib/src/cps_ir/redundant_phi.dart |
index f297a37ba42eda1d3cbdfea1894b12229f6ebc61..25f4cef97171379a51d43cd313089eb054b7202c 100644 |
--- a/pkg/compiler/lib/src/cps_ir/redundant_phi.dart |
+++ b/pkg/compiler/lib/src/cps_ir/redundant_phi.dart |
@@ -15,8 +15,18 @@ part of dart2js.optimizers; |
class RedundantPhiEliminator extends RecursiveVisitor implements Pass { |
final Set<Continuation> workSet = new Set<Continuation>(); |
- void rewrite(final FunctionDefinition root) { |
+ void rewrite(final ExecutableDefinition root) => root.applyPass(this); |
+ |
+ void rewriteFunctionDefinition(final FunctionDefinition root) { |
if (root.isAbstract) return; |
+ rewriteExecutableDefinition(root); |
+ } |
+ |
+ void rewriteFieldDefinition(final FieldDefinition root) { |
+ rewriteExecutableDefinition(root); |
+ } |
+ |
+ void rewriteExecutableDefinition(final ExecutableDefinition root) { |
// Set all parent pointers. |
new ParentVisitor().visit(root); |