Disable the fast top-level compiler for non-global declarations.
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Nov 2009 11:45:18 +0000 (11:45 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Nov 2009 11:45:18 +0000 (11:45 +0000)
Reintroduce the bailout that was put in in revision 3224.

It causes interactive ui test failures in Chromium.

TBR=fschneider@chromium.org
Review URL: http://codereview.chromium.org/421002

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

src/compiler.cc

index 4e80a245023a582db68bcd2c1f76434b5f24c223..484e3682b34bb676ea8cd8e325df5f155097b9cd 100644 (file)
@@ -646,8 +646,9 @@ void CodeGenSelector::VisitStatements(ZoneList<Statement*>* stmts) {
 
 
 void CodeGenSelector::VisitDeclaration(Declaration* decl) {
-  if (decl->fun() != NULL) {
-    ProcessExpression(decl->fun(), Expression::kValue);
+  Variable* var = decl->proxy()->var();
+  if (!var->is_global() || var->mode() == Variable::CONST) {
+    BAILOUT("Non-global declaration");
   }
 }