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

Unified Diff: src/preparser.h

Issue 633053002: Do not save/restore AST id generator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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') | 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 f3bb292e2c5ca56afd33939d0e860091f4c0176e..5c2a62218524ec4e38ab1ba19261d7814e29beb5 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -123,8 +123,6 @@ class ParserBase : public Traits {
}
protected:
- friend class Traits::Checkpoint;
-
enum AllowEvalOrArgumentsAsIdentifier {
kAllowEvalOrArguments,
kDontAllowEvalOrArguments
@@ -135,7 +133,7 @@ class ParserBase : public Traits {
PARSE_EAGERLY
};
- class CheckpointBase;
+ class Checkpoint;
class ObjectLiteralChecker;
// ---------------------------------------------------------------------------
@@ -235,16 +233,16 @@ class ParserBase : public Traits {
typename Traits::Type::Factory factory_;
friend class ParserTraits;
- friend class CheckpointBase;
+ friend class Checkpoint;
};
// Annoyingly, arrow functions first parse as comma expressions, then when we
// see the => we have to go back and reinterpret the arguments as being formal
// parameters. To do so we need to reset some of the parser state back to
// what it was before the arguments were first seen.
- class CheckpointBase BASE_EMBEDDED {
+ class Checkpoint BASE_EMBEDDED {
public:
- explicit CheckpointBase(ParserBase* parser) {
+ explicit Checkpoint(ParserBase* parser) {
function_state_ = parser->function_state_;
next_materialized_literal_index_ =
function_state_->next_materialized_literal_index_;
@@ -1149,8 +1147,6 @@ class PreParserTraits {
typedef PreParserFactory Factory;
};
- class Checkpoint;
-
explicit PreParserTraits(PreParser* pre_parser) : pre_parser_(pre_parser) {}
// Custom operations executed when FunctionStates are created and
@@ -2164,7 +2160,7 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN, bool* ok) {
}
if (fni_ != NULL) fni_->Enter();
- typename Traits::Checkpoint checkpoint(this);
+ ParserBase<Traits>::Checkpoint checkpoint(this);
ExpressionT expression =
this->ParseConditionalExpression(accept_IN, CHECK_OK);
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698