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

Unified Diff: src/compiler.cc

Issue 2274253003: [compiler] Don't canonicalize handles in Crankshaft. (Closed)
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | 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 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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698