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

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

Issue 735253003: Add CPS IR transformation to make the JavaScript backend specific semantics explicit in the tree. (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/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.
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('j') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698