Reviewers: Kevin Millikin,

Description:
Check phi uses of the arguments object after redundant phies elimination.

This allows to handle code like:

var a = arguments;
while (smth) a[i];

without bailout.

[email protected]


Please review this at http://codereview.chromium.org/7465078/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M benchmarks/run.js
  M src/hydrogen.cc


Index: benchmarks/run.js
diff --git a/benchmarks/run.js b/benchmarks/run.js
index da95fb498f7339a0ae9d72512c422e50bdb13999..1565fcf1cf082b2acf4a66e9bf9a4c60fafcf86e 100644
--- a/benchmarks/run.js
+++ b/benchmarks/run.js
@@ -27,13 +27,13 @@


 load('base.js');
-load('richards.js');
-load('deltablue.js');
-load('crypto.js');
-load('raytrace.js');
+//load('richards.js');
+//load('deltablue.js');
+//load('crypto.js');
+//load('raytrace.js');
 load('earley-boyer.js');
-load('regexp.js');
-load('splay.js');
+//load('regexp.js');
+//load('splay.js');

 var success = true;

Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 338f713c31d3d0c445a0a37380403d67c56defc1..be56c673b9ea8003bbac6fb15d28e5e5ae23156c 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -2311,11 +2311,11 @@ HGraph* HGraphBuilder::CreateGraph() {
   graph()->OrderBlocks();
   graph()->AssignDominators();
   graph()->PropagateDeoptimizingMark();
+  graph()->EliminateRedundantPhis();
   if (!graph()->CheckPhis()) {
     Bailout("Unsupported phi use of arguments object");
     return NULL;
   }
-  graph()->EliminateRedundantPhis();
   if (FLAG_eliminate_dead_phis) graph()->EliminateUnreachablePhis();
   if (!graph()->CollectPhis()) {
     Bailout("Unsupported phi use of uninitialized constant");


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to