From 5289e3e08b95024b2e7817a5d12a509cb418f7c9 Mon Sep 17 00:00:00 2001 From: "fschneider@chromium.org" Date: Fri, 2 Sep 2011 09:29:21 +0000 Subject: [PATCH] Allow OSR for closures that reference context slots. 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc index 917f6d0..26d8846 100644 --- a/src/runtime-profiler.cc +++ b/src/runtime-profiler.cc @@ -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 -- 2.7.4