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

Unified Diff: src/parser.h

Issue 1078093002: Factor formal argument parsing into ParserBase (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Rebase on top of "undefined" error detection, remove bits of utils.h patch that crept in Created 5 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
« no previous file with comments | « src/messages.js ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 8e792d8b657d57562b4a6f77fc51aa8dc1810364..ee3727e165558508dca151c8b8e3225d9b9928a5 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -557,6 +557,8 @@ class ParserTraits {
typedef ObjectLiteral::Property* ObjectLiteralProperty;
typedef ZoneList<v8::internal::Expression*>* ExpressionList;
typedef ZoneList<ObjectLiteral::Property*>* PropertyList;
+ typedef const v8::internal::AstRawString* FormalParameter;
+ typedef ZoneList<const v8::internal::AstRawString*>* FormalParameterList;
typedef ZoneList<v8::internal::Statement*>* StatementList;
// For constructing objects returned by the traversing functions.
@@ -705,6 +707,10 @@ class ParserTraits {
static ZoneList<Expression*>* NullExpressionList() {
return NULL;
}
+ static const AstRawString* EmptyFormalParameter() { return NULL; }
+ static ZoneList<const AstRawString*>* NullFormalParameterList() {
+ return NULL;
+ }
// Non-NULL empty string.
V8_INLINE const AstRawString* EmptyIdentifierString();
@@ -740,6 +746,10 @@ class ParserTraits {
ZoneList<v8::internal::Statement*>* NewStatementList(int size, Zone* zone) {
return new(zone) ZoneList<v8::internal::Statement*>(size, zone);
}
+ ZoneList<const v8::internal::AstRawString*>* NewFormalParameterList(
+ int size, Zone* zone) {
+ return new (zone) ZoneList<const v8::internal::AstRawString*>(size, zone);
+ }
V8_INLINE Scope* NewScope(Scope* parent_scope, ScopeType scope_type,
FunctionKind kind = kNormalFunction);
« no previous file with comments | « src/messages.js ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698