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

Unified Diff: src/parser.h

Issue 214883002: Two-threaded parser (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 | « src/isolate.cc ('k') | src/parser.cc » ('j') | src/parser-thread.cc » ('J')
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 216ee66e2985dddbd4346d9e3b2831fd48bbab6c..b04be1aa863fdcf3ab62ce6b07ff04dd5db0548e 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -790,13 +790,19 @@ class Parser : public ParserBase<ParserTraits> {
Handle<String> LookupCachedSymbol(int symbol_id);
- // Skip over a lazy function, either using cached data if we have it, or
- // by parsing the function with PreParser. Consumes the ending }.
+ // Skip over a lazy function, either using cached data if we have it, or by
+ // parsing the function with PreParser. After returning, the position is just
+ // before 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);
@@ -808,6 +814,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_;
ZoneList<Handle<String> > symbol_cache_;
« no previous file with comments | « src/isolate.cc ('k') | src/parser.cc » ('j') | src/parser-thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698