Reviewers: Jakob,

Message:
PTAL.

Description:
Add code kind check before preparing for OSR.


BUG=v8:1900, 115073


Please review this at http://codereview.chromium.org/9495005/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/runtime-profiler.cc


Index: src/runtime-profiler.cc
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
index 8bd59d1de26de83a3c4cabadbdc7d181de50bac1..70586aa06b26893030df2bb642af39df53018de3 100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -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);


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to