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

Unified Diff: src/parsing/parser.h

Issue 2324843005: [parser] Refactor of Parse*Statement*, part 6 (Closed)
Patch Set: Reorder methods Created 4 years, 3 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 | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 4001a16a21e4a308b905a812e3b59b73ee463a5e..d25051bf80c729487b17e280d40ebc5716aa4bc5 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -157,8 +157,8 @@ struct ParserTypes<Parser> {
typedef v8::internal::Statement* Statement;
typedef ZoneList<v8::internal::Statement*>* StatementList;
typedef v8::internal::Block* Block;
- typedef v8::internal::BreakableStatement* BreakableStatementT;
- typedef v8::internal::IterationStatement* IterationStatementT;
+ typedef v8::internal::BreakableStatement* BreakableStatement;
+ typedef v8::internal::IterationStatement* IterationStatement;
// For constructing objects returned by the traversing functions.
typedef AstNodeFactory Factory;
@@ -281,6 +281,9 @@ class Parser : public ParserBase<Parser> {
bool ContainsLabel(ZoneList<const AstRawString*>* labels,
const AstRawString* label);
Expression* RewriteReturn(Expression* return_value, int pos);
+ Statement* RewriteSwitchStatement(Expression* tag,
+ SwitchStatement* switch_statement,
+ ZoneList<CaseClause*>* cases, Scope* scope);
Statement* DeclareFunction(const AstRawString* variable_name,
FunctionLiteral* function, int pos,
@@ -370,9 +373,6 @@ class Parser : public ParserBase<Parser> {
DEFINE_AST_VISITOR_MEMBERS_WITHOUT_STACKOVERFLOW()
};
- CaseClause* ParseCaseClause(bool* default_seen_ptr, bool* ok);
- Statement* ParseSwitchStatement(ZoneList<const AstRawString*>* labels,
- bool* ok);
Statement* ParseForStatement(ZoneList<const AstRawString*>* labels, bool* ok);
Expression* MakeCatchContext(Handle<String> id, VariableProxy* value);
TryStatement* ParseTryStatement(bool* ok);
@@ -939,6 +939,9 @@ class Parser : public ParserBase<Parser> {
V8_INLINE ZoneList<Statement*>* NewStatementList(int size) const {
return new (zone()) ZoneList<Statement*>(size, zone());
}
+ V8_INLINE ZoneList<CaseClause*>* NewCaseClauseList(int size) const {
+ return new (zone()) ZoneList<CaseClause*>(size, zone());
+ }
V8_INLINE Block* NewBlock(ZoneList<const AstRawString*>* labels, int capacity,
bool ignore_completion_value, int pos) {
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698