Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 122550f5d5c42e8bbf55f0ea20202f2f2bdca999..3a78fd5e3e55fa7330b05a97daf282d6b3a19700 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -7249,6 +7249,18 @@ void JSFunction::MarkForLazyRecompilation() { |
ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); |
} |
+void JSFunction::MarkForParallelRecompilation() { |
+ ASSERT(is_compiled() && !IsOptimized()); |
+ ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
+ Builtins* builtins = GetIsolate()->builtins(); |
+ ReplaceCode(builtins->builtin(Builtins::kParallelRecompile)); |
+ |
+ // Unlike MarkForLazyRecompilation, after queuing a function for |
+ // recompilation on the compiler thread, we actually tail-call into |
+ // the full code. We reset the profiler ticks here so that the |
+ // function doesn't bother the runtime profiler too much. |
+ shared()->code()->set_profiler_ticks(0); |
+} |
static bool CompileLazyHelper(CompilationInfo* info, |
ClearExceptionFlag flag) { |