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

Unified Diff: src/parsing/parser.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 | « src/compiler-dispatcher/compiler-dispatcher-job.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index d25051bf80c729487b17e280d40ebc5716aa4bc5..63100a2a14badf909cec24e332f71c85a7724663 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -184,8 +184,16 @@ class Parser : public ParserBase<Parser> {
bool Parse(ParseInfo* info);
void ParseOnBackground(ParseInfo* info);
- void DeserializeScopeChain(ParseInfo* info, Handle<Context> context,
- Scope::DeserializationMode deserialization_mode);
+ // Deserialize the scope chain prior to parsing in which the script is going
+ // to be executed. If the script is a top-level script, or the scope chain
+ // consists of only a native context, maybe_context should be an empty
+ // handle.
+ //
+ // This only deserializes the scope chain, but doesn't connect the scopes to
+ // their corresponding scope infos. Therefore, looking up variables in the
+ // deserialized scopes is not possible.
+ void DeserializeScopeChain(ParseInfo* info,
+ MaybeHandle<Context> maybe_context);
// Handle errors detected during parsing, move statistics to Isolate,
// internalize strings (move them to the heap).
@@ -433,8 +441,7 @@ class Parser : public ParserBase<Parser> {
void InsertShadowingVarBindingInitializers(Block* block);
// Implement sloppy block-scoped functions, ES2015 Annex B 3.3
- void InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope,
- bool* ok);
+ void InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope);
VariableProxy* NewUnresolved(const AstRawString* name, int begin_pos,
int end_pos = kNoSourcePosition,
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-job.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698