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

Unified Diff: src/ast/ast.h

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope 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
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index 1457a315c6531c490c6757f4901a3ede7b110072..c8171a5c482c7f618cce6a39b87324a1c26c719e 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -2544,7 +2544,7 @@ class FunctionLiteral final : public Expression {
Handle<String> name() const { return raw_name_->string(); }
const AstString* raw_name() const { return raw_name_; }
void set_raw_name(const AstString* name) { raw_name_ = name; }
- Scope* scope() const { return scope_; }
+ DeclarationScope* scope() const { return scope_; }
ZoneList<Statement*>* body() const { return body_; }
void set_function_token_position(int pos) { function_token_position_ = pos; }
int function_token_position() const { return function_token_position_; }
@@ -2661,7 +2661,7 @@ class FunctionLiteral final : public Expression {
protected:
FunctionLiteral(Zone* zone, const AstString* name,
- AstValueFactory* ast_value_factory, Scope* scope,
+ AstValueFactory* ast_value_factory, DeclarationScope* scope,
ZoneList<Statement*>* body, int materialized_literal_count,
int expected_property_count, int parameter_count,
FunctionType function_type,
@@ -2712,7 +2712,7 @@ class FunctionLiteral final : public Expression {
int yield_count_;
const AstString* raw_name_;
- Scope* scope_;
+ DeclarationScope* scope_;
ZoneList<Statement*>* body_;
const AstString* raw_inferred_name_;
Handle<String> inferred_name_;
@@ -3392,9 +3392,9 @@ class AstNodeFactory final BASE_EMBEDDED {
}
FunctionLiteral* NewFunctionLiteral(
- const AstRawString* name, Scope* scope, ZoneList<Statement*>* body,
- int materialized_literal_count, int expected_property_count,
- int parameter_count,
+ const AstRawString* name, DeclarationScope* scope,
+ ZoneList<Statement*>* body, int materialized_literal_count,
+ int expected_property_count, int parameter_count,
FunctionLiteral::ParameterFlag has_duplicate_parameters,
FunctionLiteral::FunctionType function_type,
FunctionLiteral::EagerCompileHint eager_compile_hint, FunctionKind kind,
@@ -3410,8 +3410,8 @@ class AstNodeFactory final BASE_EMBEDDED {
// result of an eval (top-level or otherwise), or the result of calling
// the Function constructor.
FunctionLiteral* NewScriptOrEvalFunctionLiteral(
- Scope* scope, ZoneList<Statement*>* body, int materialized_literal_count,
- int expected_property_count) {
+ DeclarationScope* scope, ZoneList<Statement*>* body,
+ int materialized_literal_count, int expected_property_count) {
return new (zone_) FunctionLiteral(
zone_, ast_value_factory_->empty_string(), ast_value_factory_, scope,
body, materialized_literal_count, expected_property_count, 0,
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | src/ast/ast-numbering.cc » ('j') | src/ast/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698