Allow OSR for closures that reference context slots.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 2 Sep 2011 09:29:21 +0000 (09:29 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 2 Sep 2011 09:29:21 +0000 (09:29 +0000)
Review URL: http://codereview.chromium.org/7812023

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

src/runtime-profiler.cc

index 917f6d0..26d8846 100644 (file)
@@ -115,10 +115,8 @@ void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function) {
   }
 
   SharedFunctionInfo* shared = function->shared();
-  // If the code is not optimizable or references context slots, don't try OSR.
-  if (!shared->code()->optimizable() || !shared->allows_lazy_compilation()) {
-    return;
-  }
+  // If the code is not optimizable, don't try OSR.
+  if (!shared->code()->optimizable()) return;
 
   // We are not prepared to do OSR for a function that already has an
   // allocated arguments object.  The optimized code would bypass it for