| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index f44f092ccf2322e427db648f153cb2a3dd480f90..ef27b81038f0784a85dcd4de9f998b265b41edb5 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -348,10 +348,6 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
|
| return AbortOptimization(kTooManyParametersLocals);
|
| }
|
|
|
| - if (scope->HasIllegalRedeclaration()) {
|
| - return AbortOptimization(kFunctionWithIllegalRedeclaration);
|
| - }
|
| -
|
| // Check the whitelist for Crankshaft.
|
| if (!info()->closure()->PassesFilter(FLAG_hydrogen_filter)) {
|
| return AbortOptimization(kHydrogenFilter);
|
| @@ -409,6 +405,11 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
|
| // Do not use Crankshaft if the code is intended to be serialized.
|
| if (!isolate()->use_crankshaft()) return SetLastStatus(FAILED);
|
|
|
| + if (scope->HasIllegalRedeclaration()) {
|
| + // Crankshaft cannot handle illegal redeclarations.
|
| + return AbortOptimization(kFunctionWithIllegalRedeclaration);
|
| + }
|
| +
|
| if (FLAG_trace_opt) {
|
| OFStream os(stdout);
|
| os << "[compiling method " << Brief(*info()->closure())
|
|
|