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

Unified Diff: src/preparser.h

Issue 181543003: Proof of concept: API for doing only one parsing pass instead of first preparsing and then parsing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased -- this applies to r19832 Created 6 years, 9 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/parser.cc ('k') | no next file » | 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 59a9a6108aca239f12537e032eaa14cf4b5a3a74..ba7844ff715c7b6b0ac14a97ab45c2fe091d9792 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -44,6 +44,7 @@ class ParserBase : public Traits {
public:
ParserBase(Scanner* scanner, uintptr_t stack_limit,
v8::Extension* extension,
+ ParserRecorder* log,
typename Traits::Type::Zone* zone,
typename Traits::Type::Parser this_object)
: Traits(this_object),
@@ -52,6 +53,7 @@ class ParserBase : public Traits {
function_state_(NULL),
extension_(extension),
fni_(NULL),
+ log_(log),
scanner_(scanner),
stack_limit_(stack_limit),
stack_overflow_(false),
@@ -408,6 +410,7 @@ class ParserBase : public Traits {
FunctionState* function_state_; // Function state stack.
v8::Extension* extension_;
FuncNameInferrer* fni_;
+ ParserRecorder* log_;
private:
Scanner* scanner_;
@@ -810,11 +813,9 @@ class PreParser : public ParserBase<PreParserTraits> {
kPreParseSuccess
};
- PreParser(Scanner* scanner,
- ParserRecorder* log,
- uintptr_t stack_limit)
- : ParserBase<PreParserTraits>(scanner, stack_limit, NULL, NULL, this),
- log_(log) {}
+ PreParser(Scanner* scanner, ParserRecorder* log, uintptr_t stack_limit)
+ : ParserBase<PreParserTraits>(scanner, stack_limit, NULL, log, NULL,
+ this) {}
// Pre-parse the program from the character stream; returns true on
// success (even if parsing failed, the pre-parse data successfully
@@ -977,8 +978,6 @@ class PreParser : public ParserBase<PreParserTraits> {
Expression GetStringSymbol();
bool CheckInOrOf(bool accept_OF);
-
- ParserRecorder* log_;
};
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698