Remove duplicate script scope.
authormarja <marja@chromium.org>
Fri, 13 Mar 2015 09:46:05 +0000 (02:46 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 13 Mar 2015 09:46:14 +0000 (09:46 +0000)
We previously had two nested SCRIPT_SCOPEs (used to be GLOBAL_SCOPES), but as
the lexical variable implementation changed, the inner one is no longer needed.
BUG=

Review URL: https://codereview.chromium.org/1002193002

Cr-Commit-Position: refs/heads/master@{#27176}

src/parser.cc

index 255fd28..ff7d61d 100644 (file)
@@ -994,8 +994,6 @@ FunctionLiteral* Parser::DoParseProgram(ParseInfo* info, Scope** scope,
       if (!(*scope)->is_script_scope() || is_strict(info->language_mode())) {
         *scope = NewScope(*scope, EVAL_SCOPE);
       }
-    } else if (info->is_global()) {
-      *scope = NewScope(*scope, SCRIPT_SCOPE);
     } else if (info->is_module()) {
       *scope = NewScope(*scope, MODULE_SCOPE);
     }