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

Unified Diff: src/parsing/preparser.h

Issue 2212383003: Revert of Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/pattern-rewriter.cc ('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 cea907fbe8062645ba8ea7b92e686d84bf27d535..f3dbec0fa4a7669b6af3a3f34f311bdb759ecd71 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -574,7 +574,7 @@
struct PreParserFormalParameters : FormalParametersBase {
- explicit PreParserFormalParameters(DeclarationScope* scope)
+ explicit PreParserFormalParameters(Scope* scope)
: FormalParametersBase(scope) {}
int arity = 0;
@@ -920,8 +920,7 @@
int initializer_end_position, bool is_rest) {
++parameters->arity;
}
- void DeclareFormalParameter(DeclarationScope* scope,
- PreParserIdentifier parameter,
+ void DeclareFormalParameter(Scope* scope, PreParserIdentifier parameter,
Type::ExpressionClassifier* classifier) {
if (!classifier->is_simple_parameter_list()) {
scope->SetHasNonSimpleParameters();
@@ -1046,7 +1045,9 @@
// ModuleDeclarationInstantiation for Source Text Module Records creates a
// new Module Environment Record whose outer lexical environment record is
// the global scope.
- if (is_module) scope = NewModuleScope(scope);
+ if (is_module) {
+ scope = NewScopeWithParent(scope, MODULE_SCOPE);
+ }
FunctionState top_scope(&function_state_, &scope_state_, scope,
kNormalFunction);
« no previous file with comments | « src/parsing/pattern-rewriter.cc ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698