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