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

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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..daadc5be55bc3d349502d3a5fd014ee564c18977 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,12 @@ class _ConstPropagationVisitor extends Visitor {
Branch branch = node.parent;
visitBranch(branch);
}
+
+ // JavaScript specific nodes.
+
+ void visitIdentical(Identical node) {
+ setValue(node, _ConstnessLattice.NonConst);
+ }
}
/// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698