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

Unified Diff: src/compiler.cc

Issue 12442002: Details wrt parallel recompilation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: re-added accidental delete Created 7 years, 10 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/flag-definitions.h » ('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 a381c3aab17db9f1723fdad0a4356ebf57f7c5ef..7a94b54b67be64eafa0f1058a930274995ee73c7 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -963,6 +963,17 @@ void Compiler::RecompileParallel(Handle<JSFunction> closure) {
void Compiler::InstallOptimizedCode(OptimizingCompiler* optimizing_compiler) {
SmartPointer<CompilationInfo> info(optimizing_compiler->info());
+ // Function may have been optimized meanwhile by OSR.
+ if (FLAG_use_osr) {
+ // Function may have already been optimized meanwhile by OSR.
+ if (!info->code().is_null() &&
+ info->code()->kind() == Code::OPTIMIZED_FUNCTION) {
+ return;
+ }
+ // OSR may also have caused optimization to be disabled.
+ if (info->shared_info()->optimization_disabled()) return;
+ }
+
Isolate* isolate = info->isolate();
VMState state(isolate, PARALLEL_COMPILER);
Logger::TimerEventScope timer(
« no previous file with comments | « src/compiler.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698