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

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
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index d01931d87741f5eacebbe776fc94d284bf580bd1..f66417b7c77fb7fc1fd9b0b0943ab0db9c3ac6d9 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -182,8 +182,14 @@ class Parser : public ParserBase<Parser> {
bool Parse(ParseInfo* info);
void ParseOnBackground(ParseInfo* info);
- void DeserializeScopeChain(ParseInfo* info, Handle<Context> context,
- Scope::DeserializationMode deserialization_mode);
+ // Inspect 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, scope_info should be an empty handle.
+ //
+ // This only stores information in the parser about the general shape of the
+ // scope chain, such as the type of the declaration context it contains, but
+ // doesn't yet deserialize the scope chain.
+ void InspectScopeChain(ParseInfo* info, MaybeHandle<ScopeInfo> scope_info);
adamk 2016/09/12 16:57:47 "Inspect" in this function name isn't helpful at a
jochen (gone - plz use gerrit) 2016/09/12 19:00:43 done
// Handle errors detected during parsing, move statistics to Isolate,
// internalize strings (move them to the heap).
@@ -448,10 +454,6 @@ class Parser : public ParserBase<Parser> {
// from a non-simple parameter list.
void InsertShadowingVarBindingInitializers(Block* block);
- // Implement sloppy block-scoped functions, ES2015 Annex B 3.3
- void InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope,
- bool* ok);
-
VariableProxy* NewUnresolved(const AstRawString* name, int begin_pos,
int end_pos = kNoSourcePosition,
VariableKind kind = NORMAL_VARIABLE);
@@ -1040,12 +1042,9 @@ class Parser : public ParserBase<Parser> {
Scanner scanner_;
PreParser* reusable_preparser_;
- Scope* original_scope_; // for ES5 function declarations in sloppy eval
-
friend class ParserTarget;
friend class ParserTargetScope;
ParserTarget* target_stack_; // for break, continue statements
-
ScriptCompiler::CompileOptions compile_options_;
ParseData* cached_parse_data_;

Powered by Google App Engine
This is Rietveld 408576698