Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 96354c8398f06c1ff6289229303fbe0095025f54..a57e2643545448abe0b3add7dad378592cd76796 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -7980,23 +7980,52 @@ void JSFunction::MarkForLazyRecompilation() { |
ASSERT(is_compiled() && !IsOptimized()); |
ASSERT(shared()->allows_lazy_compilation() || |
code()->optimizable()); |
- Builtins* builtins = GetIsolate()->builtins(); |
- ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); |
+ set_code_no_write_barrier( |
+ GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile)); |
+ // No write barrier required, since the builtin is part of the root set. |
} |
+ |
void JSFunction::MarkForParallelRecompilation() { |
ASSERT(is_compiled() && !IsOptimized()); |
ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
- Builtins* builtins = GetIsolate()->builtins(); |
- ReplaceCode(builtins->builtin(Builtins::kParallelRecompile)); |
+ ASSERT(FLAG_parallel_recompilation); |
+ if (FLAG_trace_parallel_recompilation) { |
+ PrintF(" ** Marking "); |
+ PrintName(); |
+ PrintF(" for parallel recompilation.\n"); |
+ } |
+ set_code_no_write_barrier( |
+ GetIsolate()->builtins()->builtin(Builtins::kParallelRecompile)); |
+ // No write barrier required, since the builtin is part of the root set. |
+} |
+ |
- // 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); |
+void JSFunction::MarkForInstallingRecompiledCode() { |
+ ASSERT(is_compiled() && !IsOptimized()); |
+ ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
+ ASSERT(FLAG_parallel_recompilation); |
+ set_code_no_write_barrier( |
+ GetIsolate()->builtins()->builtin(Builtins::kInstallRecompiledCode)); |
+ // No write barrier required, since the builtin is part of the root set. |
} |
+ |
+void JSFunction::MarkInRecompileQueue() { |
+ ASSERT(is_compiled() && !IsOptimized()); |
+ ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
+ ASSERT(FLAG_parallel_recompilation); |
+ if (FLAG_trace_parallel_recompilation) { |
+ PrintF(" ** Queueing "); |
+ PrintName(); |
+ PrintF(" for parallel recompilation.\n"); |
+ } |
+ set_code_no_write_barrier( |
+ GetIsolate()->builtins()->builtin(Builtins::kInRecompileQueue)); |
+ // No write barrier required, since the builtin is part of the root set. |
+} |
+ |
+ |
static bool CompileLazyHelper(CompilationInfo* info, |
ClearExceptionFlag flag) { |
// Compile the source information to a code object. |