Chromium Code Reviews| Index: pkg/compiler/lib/src/cps_ir/constant_propagation.dart |
| diff --git a/pkg/compiler/lib/src/cps_ir/constant_propagation.dart b/pkg/compiler/lib/src/cps_ir/constant_propagation.dart |
| index fc9ebba0fed2f353a69aade7efe5ce42d1bc860f..ee4ec054cd4cf8af8b2a7afe75e3ae1350d37b93 100644 |
| --- a/pkg/compiler/lib/src/cps_ir/constant_propagation.dart |
| +++ b/pkg/compiler/lib/src/cps_ir/constant_propagation.dart |
| @@ -28,7 +28,7 @@ class ConstantPropagator implements Pass { |
| // Set all parent pointers. |
| - new _ParentVisitor().visit(root); |
| + new ParentVisitor().visit(root); |
| // Analyze. In this phase, the entire term is analyzed for reachability |
| // and the constant status of each expression. |
| @@ -603,6 +603,13 @@ class _ConstPropagationVisitor extends Visitor { |
| Branch branch = node.parent; |
| visitBranch(branch); |
| } |
| + |
| + // JavaScript specific nodes. |
| + |
| + void visitIdentical(Identical node) { |
| + setReachable(node.left.definition); |
|
Kevin Millikin (Google)
2014/11/25 14:27:23
I need to understand the code in this file a bit b
karlklose
2014/11/25 14:38:46
I am not sure if it is okay to not set the paramet
|
| + setReachable(node.right.definition); |
| + } |
| } |
| /// Represents the constant-state of a variable at some point in the program. |