Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index fe36002c1d82a13d389be8885400daa4033b9047..c6234a8e4449ad97a6df005a27c2ad72642abc4c 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -7979,19 +7979,45 @@ void JSFunction::MarkForLazyRecompilation() { |
| ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); |
| } |
| + |
| void JSFunction::MarkForParallelRecompilation() { |
| ASSERT(is_compiled() && !IsOptimized()); |
| ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
| + ASSERT(FLAG_parallel_recompilation); |
| + if (FLAG_trace_parallel_recompilation) { |
| + PrintF(" ** Marking "); |
| + PrintName(); |
| + PrintF(" for parallel recompilation.\n"); |
| + } |
| Builtins* builtins = GetIsolate()->builtins(); |
| ReplaceCode(builtins->builtin(Builtins::kParallelRecompile)); |
| +} |
| + |
| + |
| +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. |
|
Jakob Kummerow
2013/03/12 15:19:30
Since this is true for all builtins, please update
Yang
2013/03/12 18:03:38
Done.
|
| +} |
| + |
| - // 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::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"); |
| + } |
| + Builtins* builtins = GetIsolate()->builtins(); |
| + ReplaceCode(builtins->builtin(Builtins::kInRecompileQueue)); |
| } |
| + |
| static bool CompileLazyHelper(CompilationInfo* info, |
| ClearExceptionFlag flag) { |
| // Compile the source information to a code object. |