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

Unified Diff: src/ast/scopes.h

Issue 2306413002: Fully deserialize the scope chain after parsing, not before (Closed)
Patch Set: updates Created 4 years, 3 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') | src/ast/scopes.cc » ('J')
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 0c10633e02fdc387cd7e238dafe9b98839b82744..ac6f3f75fe0127017c9a41ef5fb49c667bae21b0 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -98,13 +98,9 @@ class Scope: public ZoneObject {
int top_decl_;
};
- enum class DeserializationMode { kDeserializeOffHeap, kKeepScopeInfo };
-
- static Scope* DeserializeScopeChain(Isolate* isolate, Zone* zone,
- Context* context,
- DeclarationScope* script_scope,
- AstValueFactory* ast_value_factory,
- DeserializationMode deserialization_mode);
+ static Scope* DeserializeScopeChainForTesting(
+ Isolate* isolate, Zone* zone, Context* context,
+ DeclarationScope* script_scope, AstValueFactory* ast_value_factory);
// Checks if the block scope is redundant, i.e. it does not contain any
// block scoped declarations. In that case it is removed from the scope
@@ -572,8 +568,10 @@ class Scope: public ZoneObject {
void SetDefaults();
- void DeserializeScopeInfo(Isolate* isolate,
- AstValueFactory* ast_value_factory);
+ static Scope* DeserializeScopeChain(Isolate* isolate, Zone* zone,
+ Context* context,
+ DeclarationScope* script_scope,
+ AstValueFactory* ast_value_factory);
friend class DeclarationScope;
};
@@ -804,6 +802,10 @@ class DeclarationScope : public Scope {
void SetDefaults();
+ void DeserializeScopeChain(ParseInfo* parse_info);
+
+ void HoistSloppyBlockFunctionsInternal(AstNodeFactory* factory, bool* ok);
+
// If the scope is a function scope, this is the function kind.
const FunctionKind function_kind_;
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | src/ast/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698