Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: src/runtime-profiler.cc

Issue 5753005: Make closures optimizable by Crankshaft compiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor fix in hash function Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/runtime-profiler.cc
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
index 3c0490f8ded66615de1349f889a5f3b9a401a159..39e916f5f0f7e886c684987e7d6bc4ecedc16075 100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -135,7 +135,8 @@ void PendingListNode::WeakCallback(v8::Persistent<v8::Value>, void* data) {
static bool IsOptimizable(JSFunction* function) {
Code* code = function->code();
- return code->kind() == Code::FUNCTION && code->optimizable();
+ return code->kind() == Code::FUNCTION && code->optimizable()
+ && function->shared()->code() == code;
}
@@ -160,7 +161,8 @@ static void AttemptOnStackReplacement(JSFunction* function) {
// See AlwaysFullCompiler (in compiler.cc) comment on why we need
// Debug::has_break_points().
ASSERT(function->IsMarkedForLazyRecompilation());
- if (!FLAG_use_osr || Debug::has_break_points() || function->IsBuiltin()) {
+ if (!FLAG_use_osr || Debug::has_break_points() || function->IsBuiltin()
+ || !function->shared()->allows_lazy_compilation()) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698