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

Unified Diff: src/compiler.cc

Issue 1773663003: [compiler] Slightly change API to finalize compile jobs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-remove-concurrent-osr
Patch Set: Fix think'o. Created 4 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/compiler.h ('k') | src/optimizing-compile-dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index f2acdbb1931fb652e13090184dc0642a671b5671..1005582dbc74b01dbe7db9c45f5964a9d3852604 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1871,8 +1871,7 @@ MaybeHandle<Code> Compiler::GetOptimizedCodeForOSR(Handle<JSFunction> function,
return GetOptimizedCode(function, NOT_CONCURRENT, osr_ast_id, osr_frame);
}
-MaybeHandle<Code> Compiler::GetConcurrentlyOptimizedCode(
- OptimizedCompileJob* job) {
+void Compiler::FinalizeOptimizedCompileJob(OptimizedCompileJob* job) {
// Take ownership of compilation info. Deleting compilation info
// also tears down the zone and the recompile job.
base::SmartPointer<CompilationInfo> info(job->info());
@@ -1908,7 +1907,8 @@ MaybeHandle<Code> Compiler::GetConcurrentlyOptimizedCode(
info->closure()->ShortPrint();
PrintF("]\n");
}
- return Handle<Code>(*info->code());
+ info->closure()->ReplaceCode(*info->code());
+ return;
}
}
@@ -1918,7 +1918,7 @@ MaybeHandle<Code> Compiler::GetConcurrentlyOptimizedCode(
info->closure()->ShortPrint();
PrintF(" because: %s]\n", GetBailoutReason(info->bailout_reason()));
}
- return MaybeHandle<Code>();
+ info->closure()->ReplaceCode(shared->code());
}
void Compiler::PostInstantiation(Handle<JSFunction> function,
« no previous file with comments | « src/compiler.h ('k') | src/optimizing-compile-dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698