Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Unified Diff: src/compiler.cc

Issue 1115613002: [turbofan] Correctly handle illegal redeclarations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698