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

Unified Diff: src/objects.cc

Issue 10417010: Run Crankshaft on a separate thread. (Closed) Base URL: https://chromiumcodereview.appspot.com/10387157
Patch Set: Created 8 years, 7 months 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/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index cb87c71fb1193c38953701a88ffac4e1f465d9cd..2d0936e973d100497fd61fc8dc9da92b159089d1 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -31,6 +31,7 @@
#include "arguments.h"
#include "bootstrapper.h"
#include "codegen.h"
+#include "crankshaft-thread.h"
#include "debug.h"
#include "deoptimizer.h"
#include "date.h"
@@ -7305,6 +7306,14 @@ void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) {
}
+void JSFunction::CompileConcurrently() {
+ ASSERT(FLAG_concurrent_crankshaft);
+ i::Handle<JSFunction> handle(reinterpret_cast<JSFunction **>(
+ GetIsolate()->global_handles()->Create(this).location()));
+ CrankshaftThread::AddJob(GetIsolate(), handle);
+}
+
+
void JSFunction::MarkForLazyRecompilation() {
ASSERT(is_compiled() && !IsOptimized());
ASSERT(shared()->allows_lazy_compilation() ||

Powered by Google App Engine
This is Rietveld 408576698