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

Side by Side Diff: src/parsing/parser.h

Issue 2342443004: Only pass the outer scope info with ParseInfo (Closed)
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « src/parsing/parse-info.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PARSING_PARSER_H_ 5 #ifndef V8_PARSING_PARSER_H_
6 #define V8_PARSING_PARSER_H_ 6 #define V8_PARSING_PARSER_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser-base.h" 10 #include "src/parsing/parser-base.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 // Parses the source code represented by the compilation info and sets its 180 // Parses the source code represented by the compilation info and sets its
181 // function literal. Returns false (and deallocates any allocated AST 181 // function literal. Returns false (and deallocates any allocated AST
182 // nodes) if parsing failed. 182 // nodes) if parsing failed.
183 static bool ParseStatic(ParseInfo* info); 183 static bool ParseStatic(ParseInfo* info);
184 bool Parse(ParseInfo* info); 184 bool Parse(ParseInfo* info);
185 void ParseOnBackground(ParseInfo* info); 185 void ParseOnBackground(ParseInfo* info);
186 186
187 // Deserialize the scope chain prior to parsing in which the script is going 187 // Deserialize the scope chain prior to parsing in which the script is going
188 // to be executed. If the script is a top-level script, or the scope chain 188 // to be executed. If the script is a top-level script, or the scope chain
189 // consists of only a native context, maybe_context should be an empty 189 // consists of only a native context, maybe_outer_scope_info should be an
190 // handle. 190 // empty handle.
191 // 191 //
192 // This only deserializes the scope chain, but doesn't connect the scopes to 192 // This only deserializes the scope chain, but doesn't connect the scopes to
193 // their corresponding scope infos. Therefore, looking up variables in the 193 // their corresponding scope infos. Therefore, looking up variables in the
194 // deserialized scopes is not possible. 194 // deserialized scopes is not possible.
195 void DeserializeScopeChain(ParseInfo* info, 195 void DeserializeScopeChain(ParseInfo* info,
196 MaybeHandle<Context> maybe_context); 196 MaybeHandle<ScopeInfo> maybe_outer_scope_info);
197 197
198 // Handle errors detected during parsing, move statistics to Isolate, 198 // Handle errors detected during parsing, move statistics to Isolate,
199 // internalize strings (move them to the heap). 199 // internalize strings (move them to the heap).
200 void Internalize(Isolate* isolate, Handle<Script> script, bool error); 200 void Internalize(Isolate* isolate, Handle<Script> script, bool error);
201 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script); 201 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script);
202 202
203 private: 203 private:
204 friend class ParserBase<Parser>; 204 friend class ParserBase<Parser>;
205 friend class v8::internal::ExpressionClassifier<ParserTypes<Parser>>; 205 friend class v8::internal::ExpressionClassifier<ParserTypes<Parser>>;
206 206
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 1080
1081 #ifdef DEBUG 1081 #ifdef DEBUG
1082 void Print(AstNode* node); 1082 void Print(AstNode* node);
1083 #endif // DEBUG 1083 #endif // DEBUG
1084 }; 1084 };
1085 1085
1086 } // namespace internal 1086 } // namespace internal
1087 } // namespace v8 1087 } // namespace v8
1088 1088
1089 #endif // V8_PARSING_PARSER_H_ 1089 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/parsing/parse-info.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698