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

Unified Diff: src/parsing/preparser.h

Issue 2164943002: Split NewScope into NewScope and NewScopeWithParent (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 5 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/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 3b2f503b62fa71cf76d8925b583af0c748ccbf42..2bf242aa6d42d24df897bd0debda8925f3bf0a56 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -1044,7 +1044,7 @@ class PreParser : public ParserBase<PreParserTraits> {
// new Module Environment Record whose outer lexical environment record is
// the global scope.
if (is_module) {
- scope = NewScope(scope, MODULE_SCOPE);
+ scope = NewScopeWithParent(scope, MODULE_SCOPE);
}
PreParserFactory factory(nullptr);
@@ -1247,7 +1247,7 @@ PreParserStatementList PreParser::ParseEagerFunctionBody(
ParsingModeScope parsing_mode(this, PARSE_EAGERLY);
Scope* inner_scope = scope();
- if (!parameters.is_simple) inner_scope = NewScope(scope(), BLOCK_SCOPE);
+ if (!parameters.is_simple) inner_scope = NewScope(BLOCK_SCOPE);
{
BlockState block_state(&scope_state_, inner_scope);
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698