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

Unified Diff: pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart

Issue 759193005: Add support for fields to the new dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 6 years, 1 month 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
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 2dc17d9eaf0670c76887dd7610e2320ac3531aab..182e806f9242e2457417cc8daadbbabe008c771c 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
@@ -27,14 +27,12 @@ part of tree_ir.optimization;
///
/// Note that the above pattern needs no iteration since nested ifs
/// have been collapsed previously in the [StatementRewriter] phase.
-class LoopRewriter extends RecursiveVisitor implements Pass {
+class LoopRewriter extends RecursiveVisitor with PassMixin {
Set<Label> usedContinueLabels = new Set<Label>();
- void rewrite(FunctionDefinition function) {
- if (function.isAbstract) return;
-
- function.body = visitStatement(function.body);
+ void rewriteExecutableDefinition(ExecutableDefinition root) {
+ root.body = visitStatement(root.body);
}
Statement visitLabeledStatement(LabeledStatement node) {

Powered by Google App Engine
This is Rietveld 408576698