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

Unified Diff: pkg/compiler/lib/src/tree_ir/optimization/logical_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/logical_rewriter.dart
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
index f4b1a4b50fe87771404836010c7ef0ba972acbab..7138381842ab69260911eb398b74d81013b1c057 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
@@ -54,17 +54,15 @@ part of tree_ir.optimization;
/// x && !!y (!!y validated by [isBooleanValued])
/// x && y (double negation removed by [putInBooleanContext])
///
-class LogicalRewriter extends Visitor<Statement, Expression> implements Pass {
+class LogicalRewriter extends Visitor<Statement, Expression> with PassMixin {
/// Statement to be executed next by natural fallthrough. Although fallthrough
/// is not introduced in this phase, we need to reason about fallthrough when
/// evaluating the benefit of swapping the branches of an [If].
Statement fallthrough;
- void rewrite(FunctionDefinition definition) {
- if (definition.isAbstract) return;
-
- definition.body = visitStatement(definition.body);
+ void rewriteExecutableDefinition(ExecutableDefinition root) {
+ root.body = visitStatement(root.body);
}
Statement visitLabeledStatement(LabeledStatement node) {

Powered by Google App Engine
This is Rietveld 408576698