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
This commit is contained in:
parent
15542081e9
commit
59a7bdd6e2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user