Index: pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart |
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart |
index 0129c0df5665451418042ff9789725d27866d54d..8287bacdb751ff7c54394e5258fdfe5809522c4b 100644 |
--- a/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart |
+++ b/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart |
@@ -2,7 +2,10 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-part of tree_ir.optimization; |
+library tree_ir.optimization.loop_rewriter; |
+ |
+import 'optimization.dart' show Pass; |
+import '../tree_ir_nodes.dart'; |
/// Rewrites [WhileTrue] statements. |
/// |
@@ -57,8 +60,8 @@ class LoopRewriter extends RecursiveTransformer |
Set<Label> usedContinueLabels = new Set<Label>(); |
- void rewrite(RootNode root) { |
- root.replaceEachBody(visitStatement); |
+ void rewrite(FunctionDefinition root) { |
+ root.body = visitStatement(root.body); |
} |
@override |