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

Unified Diff: src/preparser.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
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index de08eb317f9cf3d1456faca7a82865394b8618a6..7c5ab83d3f0aff06298a2e4b0bd7312200b88869 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -38,6 +38,8 @@
namespace v8 {
namespace internal {
+class FastParserThread;
+
// Common base class shared between parser and pre-parser. Traits encapsulate
// the differences between Parser and PreParser:
@@ -87,6 +89,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)
@@ -98,6 +101,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),
@@ -498,6 +502,7 @@ class ParserBase : public Traits {
FuncNameInferrer* fni_;
ParserRecorder* log_;
Mode mode_;
+ FastParserThread* thread_;
private:
Scanner* scanner_;
@@ -1035,9 +1040,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
« src/preparse-data.h ('K') | « src/preparse-data.h ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698