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; |