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

Unified Diff: src/parser.h

Issue 214883002: Two-threaded parser (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 7 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/isolate.cc ('k') | 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 4f872a6e0d257429b0088454179ccc452bc315c3..58770efaf961c34851c04493cf4679147fa589f3 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -766,10 +766,15 @@ class Parser : public ParserBase<ParserTraits> {
// 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 function_block_pos,
int* materialized_literal_count,
int* expected_property_count,
+ StrictMode* strict_mode,
bool* ok);
+ void ProcessErrorFromRecorder(PreParser::PreParseResult result,
+ const SingletonLogger* logger, bool* ok);
+
PreParser::PreParseResult ParseLazyFunctionBodyWithPreParser(
SingletonLogger* logger);
@@ -781,6 +786,17 @@ class Parser : public ParserBase<ParserTraits> {
bool is_generator,
bool* ok);
+ // If possible, starts a background task for doing a fast pass over the script
+ // to find lazy functions with PreParser. Restrictions: 1) PreParser cannot
+ // yet parse everything that Parser can (e.g., harmony modules). So here we
+ // are on the safe side, and only use the FastParserThread when we're sure
+ // that the script is good (i.e., for scripts for which we produce cached
+ // data). TODO(marja): Use background tasks for other kinds of compilations
+ // too. 2) The thread cannot use the Isolate, or Handles, so this will only
+ // work if the actual data is kept outside the V8 heap as an external string.
+ void StartFastParserTaskIfPossible(Handle<String> source);
+ void FinishFastParserTask();
+
Isolate* isolate_;
Handle<Script> script_;
« no previous file with comments | « src/isolate.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698