Disable "arguments" implementation. It was too optimistic in its assumptions.
authorlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 13 Nov 2009 13:12:57 +0000 (13:12 +0000)
committerlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 13 Nov 2009 13:12:57 +0000 (13:12 +0000)
Review URL: http://codereview.chromium.org/393010

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

src/compiler.cc

index b98a931..4e80a24 100644 (file)
@@ -599,6 +599,11 @@ CodeGenSelector::CodeGenTag CodeGenSelector::Select(FunctionLiteral* fun) {
     }
   }
 
+  if (scope->arguments() != NULL) {
+    if (FLAG_trace_bailout) PrintF("function uses 'arguments'\n");
+    return NORMAL;
+  }
+
   has_supported_syntax_ = true;
   VisitDeclarations(scope->declarations());
   if (!has_supported_syntax_) return NORMAL;
@@ -797,13 +802,7 @@ void CodeGenSelector::VisitVariableProxy(VariableProxy* expr) {
         BAILOUT("Lookup slot");
       }
     } else {
-      Property* property = rewrite->AsProperty();
-      // In the presence of an arguments object, parameter variables
-      // are rewritten into property accesses on that object.
-      ASSERT_NOT_NULL(property);
-      ASSERT_NE(Expression::kUninitialized, context_);
-      Visit(property);
-      property->set_context(context_);
+      BAILOUT("access to arguments object");
     }
   }
 }