| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 8e31661a193c97cb04885b50341764164ad06c88..e906682267227c922b941ea4015620ecfd4fdb2a 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -313,19 +313,18 @@
|
| }
|
|
|
| bool UseTurboFan(Handle<SharedFunctionInfo> shared) {
|
| - if (shared->optimization_disabled()) {
|
| - return false;
|
| - }
|
| -
|
| + bool optimization_disabled = shared->optimization_disabled();
|
| bool must_use_ignition_turbo = shared->must_use_ignition_turbo();
|
|
|
| // Check the enabling conditions for Turbofan.
|
| // 1. "use asm" code.
|
| - bool is_turbofanable_asm = FLAG_turbo_asm && shared->asm_function();
|
| + bool is_turbofanable_asm =
|
| + FLAG_turbo_asm && shared->asm_function() && !optimization_disabled;
|
|
|
| // 2. Fallback for features unsupported by Crankshaft.
|
| bool is_unsupported_by_crankshaft_but_turbofanable =
|
| - must_use_ignition_turbo && strcmp(FLAG_turbo_filter, "~~") == 0;
|
| + must_use_ignition_turbo && strcmp(FLAG_turbo_filter, "~~") == 0 &&
|
| + !optimization_disabled;
|
|
|
| // 3. Explicitly enabled by the command-line filter.
|
| bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter);
|
|
|