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

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

Issue 722933003: Move shared optimizations to the tree_ir directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/copy_propagator.dart
diff --git a/pkg/compiler/lib/src/dart_backend/copy_propagator.dart b/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart
similarity index 97%
rename from pkg/compiler/lib/src/dart_backend/copy_propagator.dart
rename to pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart
index 8f9ceb86b0af359803e6a211b91e02704aea1244..1eed8b7853d8e1499f20e4586c0e1b49945dc343 100644
--- a/pkg/compiler/lib/src/dart_backend/copy_propagator.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart
@@ -2,10 +2,7 @@
// 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.
-library copy_propagator;
-
-import '../elements/elements.dart';
-import '../tree_ir/tree_ir_nodes.dart';
+part of tree_ir.optimization;
/// Eliminates moving assignments, such as w := v, by assigning directly to w
/// at the definition of v.
@@ -13,7 +10,7 @@ import '../tree_ir/tree_ir_nodes.dart';
/// This compensates for suboptimal register allocation, and merges closure
/// variables with local temporaries that were left behind when translating
/// out of CPS (where closure variables live in a separate space).
-class CopyPropagator extends RecursiveVisitor {
+class CopyPropagator extends RecursiveVisitor implements Pass {
/// After visitStatement returns, [move] maps a variable v to an
/// assignment A of form w := v, under the following conditions:
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/task.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698