| 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_;
|
|
|