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

Unified Diff: src/parser.h

Issue 237243003: Refactor ParseFunctionLiteral. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 6 years, 8 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/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 01f23f0325ade73a279ada1812f8e2d27476895c..216ee66e2985dddbd4346d9e3b2831fd48bbab6c 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -790,8 +790,23 @@ class Parser : public ParserBase<ParserTraits> {
Handle<String> LookupCachedSymbol(int symbol_id);
- PreParser::PreParseResult LazyParseFunctionLiteral(
- SingletonLogger* logger);
+ // Skip over a lazy function, either using cached data if we have it, or
+ // by parsing the function with PreParser. Consumes the ending }.
+ void SkipLazyFunctionBody(Handle<String> function_name,
+ int* materialized_literal_count,
+ int* expected_property_count,
+ bool* ok);
+
+ PreParser::PreParseResult ParseLazyFunctionBodyWithPreParser(
+ SingletonLogger* logger);
+
+ // Consumes the ending }.
+ ZoneList<Statement*>* ParseEagerFunctionBody(Handle<String> function_name,
+ int pos,
+ Variable* fvar,
+ Token::Value fvar_init_op,
+ bool is_generator,
+ bool* ok);
Isolate* isolate_;
ZoneList<Handle<String> > symbol_cache_;
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698