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

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

Issue 2650883002: Reland: [Compiler] Enable handles created during parsing and scope analysis to be deferred. (Closed)
Patch Set: Remove unused variable Created 3 years, 10 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/base/compiler-specific.h" 10 #include "src/base/compiler-specific.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // to be executed. If the script is a top-level script, or the scope chain 215 // to be executed. If the script is a top-level script, or the scope chain
216 // consists of only a native context, maybe_outer_scope_info should be an 216 // consists of only a native context, maybe_outer_scope_info should be an
217 // empty handle. 217 // empty handle.
218 // 218 //
219 // This only deserializes the scope chain, but doesn't connect the scopes to 219 // This only deserializes the scope chain, but doesn't connect the scopes to
220 // their corresponding scope infos. Therefore, looking up variables in the 220 // their corresponding scope infos. Therefore, looking up variables in the
221 // deserialized scopes is not possible. 221 // deserialized scopes is not possible.
222 void DeserializeScopeChain(ParseInfo* info, 222 void DeserializeScopeChain(ParseInfo* info,
223 MaybeHandle<ScopeInfo> maybe_outer_scope_info); 223 MaybeHandle<ScopeInfo> maybe_outer_scope_info);
224 224
225 // Handle errors detected during parsing, move statistics to Isolate, 225 // Handle errors detected during parsing
226 // internalize strings (move them to the heap). 226 void ReportErrors(Isolate* isolate, Handle<Script> script);
227 void Internalize(Isolate* isolate, Handle<Script> script, bool error); 227 // Move statistics to Isolate
228 void UpdateStatistics(Isolate* isolate, Handle<Script> script);
228 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script); 229 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script);
229 230
230 private: 231 private:
231 friend class ParserBase<Parser>; 232 friend class ParserBase<Parser>;
232 friend class v8::internal::ExpressionClassifier<ParserTypes<Parser>>; 233 friend class v8::internal::ExpressionClassifier<ParserTypes<Parser>>;
233 friend bool v8::internal::parsing::ParseProgram(ParseInfo*); 234 friend bool v8::internal::parsing::ParseProgram(ParseInfo*, bool);
234 friend bool v8::internal::parsing::ParseFunction(ParseInfo*); 235 friend bool v8::internal::parsing::ParseFunction(ParseInfo*, bool);
235 236
236 bool AllowsLazyParsingWithoutUnresolvedVariables() const { 237 bool AllowsLazyParsingWithoutUnresolvedVariables() const {
237 return scope()->AllowsLazyParsingWithoutUnresolvedVariables( 238 return scope()->AllowsLazyParsingWithoutUnresolvedVariables(
238 original_scope_); 239 original_scope_);
239 } 240 }
240 241
241 bool parse_lazily() const { return mode_ == PARSE_LAZILY; } 242 bool parse_lazily() const { return mode_ == PARSE_LAZILY; }
242 enum Mode { PARSE_LAZILY, PARSE_EAGERLY }; 243 enum Mode { PARSE_LAZILY, PARSE_EAGERLY };
243 244
244 class ParsingModeScope BASE_EMBEDDED { 245 class ParsingModeScope BASE_EMBEDDED {
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 1192
1192 private: 1193 private:
1193 ParserTarget** variable_; 1194 ParserTarget** variable_;
1194 ParserTarget* previous_; 1195 ParserTarget* previous_;
1195 }; 1196 };
1196 1197
1197 } // namespace internal 1198 } // namespace internal
1198 } // namespace v8 1199 } // namespace v8
1199 1200
1200 #endif // V8_PARSING_PARSER_H_ 1201 #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