Commit 59a7bdd6 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Add code kind check before preparing for OSR.

BUG=v8:1900, 115073

Review URL: https://chromiumcodereview.appspot.com/9495005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 15542081
......@@ -257,7 +257,8 @@ void RuntimeProfiler::OptimizeNow() {
}
}
if (function->IsMarkedForLazyRecompilation()) {
if (function->IsMarkedForLazyRecompilation() &&
function->shared()->code()->kind() == Code::FUNCTION) {
Code* unoptimized = function->shared()->code();
int nesting = unoptimized->allow_osr_at_loop_nesting_level();
if (nesting == 0) AttemptOnStackReplacement(function);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment