Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 00beeb6ef621f75d029e8136081b533f81230664..4ba9fcea5fc5f40e3ff2ed74ca2dee81f5bb2f83 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -698,7 +698,7 @@ bool GetOptimizedCodeNow(CompilationJob* job) { |
return true; |
} |
-bool GetOptimizedCodeLater(CompilationJob* job) { |
+bool GetOptimizedCodeLater(CompilationJob* job, bool use_turbofan) { |
CompilationInfo* info = job->info(); |
Isolate* isolate = info->isolate(); |
@@ -724,7 +724,8 @@ bool GetOptimizedCodeLater(CompilationJob* job) { |
// deferred handle scope that is detached and handed off to the background |
// thread when we return. |
CompilationHandleScope handle_scope(info); |
Michael Starzinger
2016/08/25 11:44:20
Would it be possible to hoist both, the Compilatio
|
- CanonicalHandleScope canonical(isolate); |
+ std::unique_ptr<CanonicalHandleScope> canonical; |
+ if (use_turbofan) canonical.reset(new CanonicalHandleScope(info->isolate())); |
// Parsing is not required when optimizing from existing bytecode. |
if (!info->is_optimizing_from_bytecode()) { |
@@ -840,7 +841,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, |
} |
if (mode == Compiler::CONCURRENT) { |
- if (GetOptimizedCodeLater(job.get())) { |
+ if (GetOptimizedCodeLater(job.get(), use_turbofan)) { |
job.release(); // The background recompile job owns this now. |
return isolate->builtins()->InOptimizationQueue(); |
} |