Index: src/parsing/parser.h |
diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
index 6fbd9126af63cd577f95ac0e7f6df1951c435077..517dcd8a270fb0690653b53214a68f078514dc11 100644 |
--- a/src/parsing/parser.h |
+++ b/src/parsing/parser.h |
@@ -101,8 +101,10 @@ class ParseInfo { |
compile_options_ = compile_options; |
} |
- Scope* script_scope() { return script_scope_; } |
- void set_script_scope(Scope* script_scope) { script_scope_ = script_scope; } |
+ DeclarationScope* script_scope() { return script_scope_; } |
+ void set_script_scope(DeclarationScope* script_scope) { |
+ script_scope_ = script_scope; |
+ } |
AstValueFactory* ast_value_factory() { return ast_value_factory_; } |
void set_ast_value_factory(AstValueFactory* ast_value_factory) { |
@@ -112,8 +114,8 @@ class ParseInfo { |
FunctionLiteral* literal() { return literal_; } |
void set_literal(FunctionLiteral* literal) { literal_ = literal; } |
- Scope* scope() { return scope_; } |
- void set_scope(Scope* scope) { scope_ = scope; } |
+ DeclarationScope* scope() { return scope_; } |
+ void set_scope(DeclarationScope* scope) { scope_ = scope; } |
UnicodeCache* unicode_cache() { return unicode_cache_; } |
void set_unicode_cache(UnicodeCache* unicode_cache) { |
@@ -183,7 +185,7 @@ class ParseInfo { |
Utf16CharacterStream* character_stream_; |
v8::Extension* extension_; |
ScriptCompiler::CompileOptions compile_options_; |
- Scope* script_scope_; |
+ DeclarationScope* script_scope_; |
UnicodeCache* unicode_cache_; |
uintptr_t stack_limit_; |
uint32_t hash_seed_; |
@@ -200,7 +202,7 @@ class ParseInfo { |
//----------- Outputs of parsing and scope analysis ------------------------ |
FunctionLiteral* literal_; // produced by full parser. |
- Scope* scope_; // produced by scope analysis. |
+ DeclarationScope* scope_; // produced by scope analysis. |
void SetFlag(Flag f) { flags_ |= f; } |
void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
@@ -313,7 +315,7 @@ struct ParserFormalParameters : FormalParametersBase { |
} |
}; |
- explicit ParserFormalParameters(Scope* scope) |
+ explicit ParserFormalParameters(DeclarationScope* scope) |
: FormalParametersBase(scope), params(4, scope->zone()) {} |
ZoneList<Parameter> params; |
@@ -549,7 +551,7 @@ class ParserTraits { |
Type::ExpressionClassifier* classifier, int pos, bool* ok); |
V8_INLINE Scope* NewScope(ScopeType scope_type); |
- V8_INLINE Scope* NewFunctionScope(FunctionKind kind); |
+ V8_INLINE DeclarationScope* NewFunctionScope(FunctionKind kind); |
V8_INLINE Scope* NewScopeWithParent(Scope* parent, ScopeType scope_type); |
V8_INLINE void AddFormalParameter(ParserFormalParameters* parameters, |
@@ -557,7 +559,8 @@ class ParserTraits { |
Expression* initializer, |
int initializer_end_position, bool is_rest); |
V8_INLINE void DeclareFormalParameter( |
- Scope* scope, const ParserFormalParameters::Parameter& parameter, |
+ DeclarationScope* scope, |
+ const ParserFormalParameters::Parameter& parameter, |
Type::ExpressionClassifier* classifier); |
void ParseArrowFunctionFormalParameters(ParserFormalParameters* parameters, |
Expression* params, int end_pos, |
@@ -1033,7 +1036,7 @@ class Parser : public ParserBase<ParserTraits> { |
void InsertShadowingVarBindingInitializers(Block* block); |
// Implement sloppy block-scoped functions, ES2015 Annex B 3.3 |
- void InsertSloppyBlockFunctionVarBindings(Scope* scope, |
+ void InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope, |
Scope* complex_params_scope, |
bool* ok); |
@@ -1155,7 +1158,7 @@ Scope* ParserTraits::NewScope(ScopeType scope_type) { |
return parser_->NewScope(scope_type); |
} |
-Scope* ParserTraits::NewFunctionScope(FunctionKind kind) { |
+DeclarationScope* ParserTraits::NewFunctionScope(FunctionKind kind) { |
return parser_->NewFunctionScope(kind); |
} |
@@ -1271,9 +1274,8 @@ void ParserTraits::AddFormalParameter(ParserFormalParameters* parameters, |
parameters->scope->zone()); |
} |
- |
void ParserTraits::DeclareFormalParameter( |
- Scope* scope, const ParserFormalParameters::Parameter& parameter, |
+ DeclarationScope* scope, const ParserFormalParameters::Parameter& parameter, |
Type::ExpressionClassifier* classifier) { |
bool is_duplicate = false; |
bool is_simple = classifier->is_simple_parameter_list(); |