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

Unified Diff: src/ast/scopes.h

Issue 2270743002: Scopes: simplfy scope creation for with scopes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: leaner version 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 | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 78ad0c4b009abe78c2113454088a17cce798df75..2370f51a00e388aa7b982c4e4530ae7b5aa9df9a 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -438,8 +438,7 @@ class Scope: public ZoneObject {
void set_is_debug_evaluate_scope() { is_debug_evaluate_scope_ = true; }
protected:
- // Creates a script scope.
- explicit Scope(Zone* zone);
+ explicit Scope(Zone* zone, ScopeType scope_type = SCRIPT_SCOPE);
void set_language_mode(LanguageMode language_mode) {
is_strict_ = is_strict(language_mode);
@@ -566,12 +565,10 @@ class Scope: public ZoneObject {
void AllocateVariablesRecursively();
// Construct a scope based on the scope info.
- Scope(Zone* zone, Scope* inner_scope, ScopeType type,
- Handle<ScopeInfo> scope_info);
+ Scope(Zone* zone, ScopeType type, Handle<ScopeInfo> scope_info);
// Construct a catch scope with a binding for the name.
- Scope(Zone* zone, Scope* inner_scope,
- const AstRawString* catch_variable_name);
+ Scope(Zone* zone, const AstRawString* catch_variable_name);
void AddInnerScope(Scope* inner_scope) {
inner_scope->sibling_ = inner_scope_;
@@ -606,7 +603,7 @@ class DeclarationScope : public Scope {
public:
DeclarationScope(Zone* zone, Scope* outer_scope, ScopeType scope_type,
FunctionKind function_kind = kNormalFunction);
- DeclarationScope(Zone* zone, Scope* inner_scope, ScopeType scope_type,
+ DeclarationScope(Zone* zone, ScopeType scope_type,
Handle<ScopeInfo> scope_info);
// Creates a script scope.
explicit DeclarationScope(Zone* zone);
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698