Check phi uses of the arguments object after redundant phies elimination.
authorvegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 3 Aug 2011 10:40:03 +0000 (10:40 +0000)
committervegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 3 Aug 2011 10:40:03 +0000 (10:40 +0000)
This allows to handle code like:

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

without bailout.

R=kmillikin@chromium.org

Review URL: http://codereview.chromium.org/7465078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen.cc

index 338f713..be56c67 100644 (file)
@@ -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");