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

Unified Diff: pkg/compiler/lib/src/cps_ir/redundant_phi.dart

Issue 787603003: Generative constructors in the new dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/cps_ir/redundant_phi.dart
diff --git a/pkg/compiler/lib/src/cps_ir/redundant_phi.dart b/pkg/compiler/lib/src/cps_ir/redundant_phi.dart
index e2f4ba96c853ea79716c4820dc094a96dd45b7a7..ec665c1cc404b48be68e91cca7957fb0f330598c 100644
--- a/pkg/compiler/lib/src/cps_ir/redundant_phi.dart
+++ b/pkg/compiler/lib/src/cps_ir/redundant_phi.dart
@@ -2,7 +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.
-part of dart2js.optimizers;
+part of dart2js.cps_ir.optimizers;
/// Eliminate redundant phis from the given [FunctionDefinition].
///
@@ -12,21 +12,10 @@ part of dart2js.optimizers;
/// (except for feedback). Redundant parameters are removed from the
/// continuation signature, all invocations, and replaced within the
/// continuation body.
-class RedundantPhiEliminator extends RecursiveVisitor implements Pass {
+class RedundantPhiEliminator extends RecursiveVisitor with PassMixin {
final Set<Continuation> workSet = new Set<Continuation>();
- void rewrite(final ExecutableDefinition root) => root.applyPass(this);
-
- void rewriteFunctionDefinition(final FunctionDefinition root) {
- if (root.isAbstract) return;
- rewriteExecutableDefinition(root);
- }
-
- void rewriteFieldDefinition(final FieldDefinition root) {
- if (!root.hasInitializer) return;
- rewriteExecutableDefinition(root);
- }
-
+ @override
void rewriteExecutableDefinition(final ExecutableDefinition root) {
// Set all parent pointers.

Powered by Google App Engine
This is Rietveld 408576698