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

Unified Diff: pkg/compiler/lib/src/cps_ir/shrinking_reductions.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 | « pkg/compiler/lib/src/cps_ir/redundant_phi.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/task.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/shrinking_reductions.dart
diff --git a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
index f14ece5a98f9ee8b123bee06c896fb666b410602..f7f4bc11f85c3efc266f176252819e12c26571e0 100644
--- a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
+++ b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
@@ -22,7 +22,7 @@ class ShrinkingReducer implements Pass {
_redexVisitor = new _RedexVisitor(_worklist);
// Set all parent pointers.
- new _ParentVisitor().visit(root);
+ new ParentVisitor().visit(root);
// Sweep over the term, collecting redexes into the worklist.
_redexVisitor.visitFunctionDefinition(root);
@@ -293,7 +293,7 @@ class _RemovalRedexVisitor extends _RedexVisitor {
}
/// Traverses the CPS term and sets node.parent for each visited node.
-class _ParentVisitor extends RecursiveVisitor {
+class ParentVisitor extends RecursiveVisitor {
processFunctionDefinition(FunctionDefinition node) {
node.body.parent = node;
@@ -391,6 +391,13 @@ class _ParentVisitor extends RecursiveVisitor {
processIsTrue(IsTrue node) {
node.value.parent = node;
}
+
+ // JavaScript specific nodes.
+
+ processIdentical(Identical node) {
+ node.left.parent = node;
+ node.right.parent = node;
+ }
}
class _ReductionKind {
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/redundant_phi.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698