| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler.h" | 5 #include "src/compiler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/asmjs/asm-js.h" | 10 #include "src/asmjs/asm-js.h" |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 // Check the enabling conditions for Turbofan. | 319 // Check the enabling conditions for Turbofan. |
| 320 // 1. "use asm" code. | 320 // 1. "use asm" code. |
| 321 bool is_turbofanable_asm = | 321 bool is_turbofanable_asm = |
| 322 FLAG_turbo_asm && shared->asm_function() && !optimization_disabled; | 322 FLAG_turbo_asm && shared->asm_function() && !optimization_disabled; |
| 323 | 323 |
| 324 // 2. Fallback for features unsupported by Crankshaft. | 324 // 2. Fallback for features unsupported by Crankshaft. |
| 325 bool is_unsupported_by_crankshaft_but_turbofanable = | 325 bool is_unsupported_by_crankshaft_but_turbofanable = |
| 326 must_use_ignition_turbo && strcmp(FLAG_turbo_filter, "~~") == 0 && | 326 must_use_ignition_turbo && strcmp(FLAG_turbo_filter, "~~") == 0 && |
| 327 !optimization_disabled; | 327 !optimization_disabled; |
| 328 | 328 |
| 329 // 3. Explicitly enabled by the command-line filter. | 329 // 3. Explicitly enabled by the command-line filter which is not "*". |
| 330 bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter); | 330 bool passes_explicit_turbo_filter = |
| 331 (FLAG_turbo_filter[0] != '*') && shared->PassesFilter(FLAG_turbo_filter); |
| 331 | 332 |
| 332 return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable || | 333 return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable || |
| 333 passes_turbo_filter; | 334 passes_explicit_turbo_filter; |
| 334 } | 335 } |
| 335 | 336 |
| 336 bool ShouldUseIgnition(CompilationInfo* info) { | 337 bool ShouldUseIgnition(CompilationInfo* info) { |
| 337 DCHECK(info->has_shared_info()); | 338 DCHECK(info->has_shared_info()); |
| 338 Handle<SharedFunctionInfo> shared = info->shared_info(); | 339 Handle<SharedFunctionInfo> shared = info->shared_info(); |
| 339 | 340 |
| 340 // Code which can't be supported by the old pipeline should use Ignition. | 341 // Code which can't be supported by the old pipeline should use Ignition. |
| 341 if (shared->must_use_ignition_turbo()) return true; | 342 if (shared->must_use_ignition_turbo()) return true; |
| 342 | 343 |
| 343 // Resumable functions are not supported by {FullCodeGenerator}, suspended | 344 // Resumable functions are not supported by {FullCodeGenerator}, suspended |
| (...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1763 DCHECK(shared->is_compiled()); | 1764 DCHECK(shared->is_compiled()); |
| 1764 function->set_literals(cached.literals); | 1765 function->set_literals(cached.literals); |
| 1765 } else if (shared->is_compiled()) { | 1766 } else if (shared->is_compiled()) { |
| 1766 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1767 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
| 1767 JSFunction::EnsureLiterals(function); | 1768 JSFunction::EnsureLiterals(function); |
| 1768 } | 1769 } |
| 1769 } | 1770 } |
| 1770 | 1771 |
| 1771 } // namespace internal | 1772 } // namespace internal |
| 1772 } // namespace v8 | 1773 } // namespace v8 |
| OLD | NEW |