| Index: src/crankshaft/hydrogen.cc
|
| diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
|
| index 618747618cde269a032a77eeb0d8049c619b8b8a..f49776d0f1cd2645f1957740c8e0115cc284598c 100644
|
| --- a/src/crankshaft/hydrogen.cc
|
| +++ b/src/crankshaft/hydrogen.cc
|
| @@ -116,7 +116,11 @@ class HOptimizedGraphBuilderWithPositions : public HOptimizedGraphBuilder {
|
| };
|
|
|
| HCompilationJob::Status HCompilationJob::CreateGraphImpl() {
|
| - bool dont_crankshaft = info()->shared_info()->dont_crankshaft();
|
| + if (!isolate()->use_crankshaft() ||
|
| + info()->shared_info()->dont_crankshaft()) {
|
| + // Crankshaft is entirely disabled.
|
| + return FAILED;
|
| + }
|
|
|
| // Optimization requires a version of fullcode with deoptimization support.
|
| // Recompile the unoptimized version of the code if the current version
|
| @@ -139,11 +143,6 @@ HCompilationJob::Status HCompilationJob::CreateGraphImpl() {
|
| DCHECK(info()->shared_info()->has_deoptimization_support());
|
| DCHECK(!info()->shared_info()->never_compiled());
|
|
|
| - if (!isolate()->use_crankshaft() || dont_crankshaft) {
|
| - // Crankshaft is entirely disabled.
|
| - return FAILED;
|
| - }
|
| -
|
| // Check the whitelist for Crankshaft.
|
| if (!info()->shared_info()->PassesFilter(FLAG_hydrogen_filter)) {
|
| return AbortOptimization(kHydrogenFilter);
|
|
|