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

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

Issue 1155463005: dart2js cps: Remove dart2dart from cps pipeline and clean up. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Skip tests specific to the dart backend Created 5 years, 7 months 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
« no previous file with comments | « pkg/compiler/lib/src/tracer.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 941b22c548c7b68e54221bb3aba0152d73c8b774..4bef70a003e05952146ff70e5438d5054ee2a783 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
@@ -2,7 +2,13 @@
// 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.logical_rewriter;
+
+import '../tree_ir_nodes.dart';
+import 'optimization.dart' show Pass;
+import '../../constants/values.dart' as values;
+
+// TODO(asgerf): Update this class to use JS semantics for && and ||.
/// Rewrites logical expressions to be more compact in the Tree IR.
///
@@ -59,8 +65,8 @@ class LogicalRewriter extends RecursiveTransformer
String get passName => 'Logical rewriter';
@override
- void rewrite(RootNode node) {
- node.replaceEachBody(visitStatement);
+ void rewrite(FunctionDefinition node) {
+ node.body = visitStatement(node.body);
}
/// Statement to be executed next by natural fallthrough. Although fallthrough
« no previous file with comments | « pkg/compiler/lib/src/tracer.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698