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

Unified Diff: src/compiler.cc

Issue 1155503002: [turbofan] Prepare mechanism to enable TF on language subset. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix think'o! Created 5 years, 7 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/ast-numbering.cc ('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 c3c14a5704d7ceef78c0c6ad5ab33bbe4af32357..8460881272523230e26057d49daecbc9625d7e11 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -375,7 +375,9 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
DCHECK(info()->shared_info()->has_deoptimization_support());
// Check the enabling conditions for TurboFan.
+ bool dont_crankshaft = info()->shared_info()->dont_crankshaft();
if (((FLAG_turbo_asm && info()->shared_info()->asm_function()) ||
+ (dont_crankshaft && strcmp(FLAG_turbo_filter, "~~") == 0) ||
info()->closure()->PassesFilter(FLAG_turbo_filter)) &&
(FLAG_turbo_osr || !info()->is_osr())) {
// Use TurboFan for the compilation.
@@ -402,7 +404,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
}
}
- if (!isolate()->use_crankshaft()) {
+ if (!isolate()->use_crankshaft() || dont_crankshaft) {
// Crankshaft is entirely disabled.
return SetLastStatus(FAILED);
}
@@ -738,6 +740,7 @@ static bool Renumber(ParseInfo* parse_info) {
FunctionLiteral* lit = parse_info->function();
shared_info->set_ast_node_count(lit->ast_node_count());
MaybeDisableOptimization(shared_info, lit->dont_optimize_reason());
+ shared_info->set_dont_crankshaft(lit->flags()->Contains(kDontCrankshaft));
shared_info->set_dont_cache(lit->flags()->Contains(kDontCache));
}
return true;
« no previous file with comments | « src/ast-numbering.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698