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

Unified Diff: src/objects.cc

Issue 12488006: Parallel recompilation: remove interrupt for code generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 9 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
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698