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

Unified Diff: src/compiler/ast-graph-builder.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 | « src/compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 742797c9fe7085e7a5ad5d1a02fb933494df40b5..6809cfed01cee4a23734fe64c26e113683d81d12 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -514,6 +514,13 @@ void AstGraphBuilder::CreateGraphBody(bool stack_check) {
NewNode(javascript()->CallRuntime(Runtime::kTraceEnter, 0));
}
+ // Visit illegal re-declaration and bail out if it exists.
+ if (scope->HasIllegalRedeclaration()) {
+ AstEffectContext for_effect(this);
+ scope->VisitIllegalRedeclaration(this);
+ return;
+ }
+
// Visit implicit declaration of the function name.
if (scope->is_function_scope() && scope->function() != NULL) {
VisitVariableDeclaration(scope->function());
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698