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

Unified Diff: src/preparser.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/preparse-data.h ('k') | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 9dee863d591191a40de0a78d7d191347f9bc3966..060ab488636c93514b48cdc969ffa71f8a519dea 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -15,6 +15,8 @@
namespace v8 {
namespace internal {
+class FastParserThread;
+
// Common base class shared between parser and pre-parser. Traits encapsulate
// the differences between Parser and PreParser:
@@ -64,6 +66,7 @@ class ParserBase : public Traits {
ParserBase(Scanner* scanner, uintptr_t stack_limit,
v8::Extension* extension,
+ FastParserThread* thread,
ParserRecorder* log,
typename Traits::Type::Zone* zone,
typename Traits::Type::Parser this_object)
@@ -75,6 +78,7 @@ class ParserBase : public Traits {
fni_(NULL),
log_(log),
mode_(PARSE_EAGERLY), // Lazy mode must be set explicitly.
+ thread_(thread),
scanner_(scanner),
stack_limit_(stack_limit),
stack_overflow_(false),
@@ -474,6 +478,7 @@ class ParserBase : public Traits {
FuncNameInferrer* fni_;
ParserRecorder* log_;
Mode mode_;
+ FastParserThread* thread_;
private:
Scanner* scanner_;
@@ -1074,9 +1079,10 @@ class PreParser : public ParserBase<PreParserTraits> {
kPreParseSuccess
};
- PreParser(Scanner* scanner, ParserRecorder* log, uintptr_t stack_limit)
- : ParserBase<PreParserTraits>(scanner, stack_limit, NULL, log, NULL,
- this) {}
+ PreParser(Scanner* scanner, ParserRecorder* log, uintptr_t stack_limit,
+ FastParserThread* thread)
+ : ParserBase<PreParserTraits>(scanner, stack_limit, NULL, thread, log,
+ NULL, this) {}
// Pre-parse the program from the character stream; returns true on
// success (even if parsing failed, the pre-parse data successfully
« no previous file with comments | « src/preparse-data.h ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698