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

Unified Diff: src/parsing/parser.h

Issue 2452403003: Changed statement ZoneList to a ZoneChunkList
Patch Set: Created 4 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/isolate.cc ('k') | 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 b1a0c1a9c0716a55c549b534a3f9c46a408f2b6c..c11fa02026f1d09c80e376fbd3135dc35cfff109 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -157,7 +157,7 @@ struct ParserTypes<Parser> {
typedef ZoneList<ClassLiteral::Property*>* ClassPropertyList;
typedef ParserFormalParameters FormalParameters;
typedef v8::internal::Statement* Statement;
- typedef ZoneList<v8::internal::Statement*>* StatementList;
+ typedef ZoneChunkList<v8::internal::Statement*>* StatementList;
typedef v8::internal::Block* Block;
typedef v8::internal::BreakableStatement* BreakableStatement;
typedef v8::internal::IterationStatement* IterationStatement;
@@ -258,7 +258,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
compile_options_ == ScriptCompiler::kProduceParserCache;
}
- void ParseModuleItemList(ZoneList<Statement*>* body, bool* ok);
+ void ParseModuleItemList(ZoneChunkList<Statement*>* body, bool* ok);
Statement* ParseModuleItem(bool* ok);
const AstRawString* ParseModuleSpecifier(bool* ok);
void ParseImportDeclaration(bool* ok);
@@ -503,7 +503,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
Block* BuildRejectPromiseOnException(Block* block, bool* ok);
// Consumes the ending }.
- ZoneList<Statement*>* ParseEagerFunctionBody(
+ ZoneChunkList<Statement*>* ParseEagerFunctionBody(
const AstRawString* function_name, int pos,
const ParserFormalParameters& parameters, FunctionKind kind,
FunctionLiteral::FunctionType function_type, bool* ok);
@@ -600,17 +600,18 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
Statement* FinalizeForOfStatement(ForOfStatement* loop, Variable* completion,
int pos);
- void BuildIteratorClose(ZoneList<Statement*>* statements, Variable* iterator,
- Variable* input, Variable* output);
- void BuildIteratorCloseForCompletion(ZoneList<Statement*>* statements,
+ void BuildIteratorClose(ZoneChunkList<Statement*>* statements,
+ Variable* iterator, Variable* input,
+ Variable* output);
+ void BuildIteratorCloseForCompletion(ZoneChunkList<Statement*>* statements,
Variable* iterator,
Expression* completion);
Statement* CheckCallable(Variable* var, Expression* error, int pos);
V8_INLINE Expression* RewriteAwaitExpression(Expression* value, int pos);
- V8_INLINE void PrepareAsyncFunctionBody(ZoneList<Statement*>* body,
+ V8_INLINE void PrepareAsyncFunctionBody(ZoneChunkList<Statement*>* body,
FunctionKind kind, int pos);
- V8_INLINE void RewriteAsyncFunctionBody(ZoneList<Statement*>* body,
+ V8_INLINE void RewriteAsyncFunctionBody(ZoneChunkList<Statement*>* body,
Block* block,
Expression* return_value, bool* ok);
@@ -891,8 +892,10 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
V8_INLINE static bool IsNullExpressionList(ZoneList<Expression*>* exprs) {
return exprs == nullptr;
}
- V8_INLINE static ZoneList<Statement*>* NullStatementList() { return nullptr; }
- V8_INLINE static bool IsNullStatementList(ZoneList<Statement*>* stmts) {
+ V8_INLINE static ZoneChunkList<Statement*>* NullStatementList() {
+ return nullptr;
+ }
+ V8_INLINE static bool IsNullStatementList(ZoneChunkList<Statement*>* stmts) {
return stmts == nullptr;
}
V8_INLINE static Statement* NullStatement() { return nullptr; }
@@ -968,8 +971,8 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
int size) const {
return new (zone()) ZoneList<ClassLiteral::Property*>(size, zone());
}
- V8_INLINE ZoneList<Statement*>* NewStatementList(int size) const {
- return new (zone()) ZoneList<Statement*>(size, zone());
+ V8_INLINE ZoneChunkList<Statement*>* NewStatementList(int size) const {
+ return new (zone()) ZoneChunkList<Statement*>(zone());
}
V8_INLINE ZoneList<CaseClause*>* NewCaseClauseList(int size) const {
return new (zone()) ZoneList<CaseClause*>(size, zone());
@@ -985,7 +988,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
}
V8_INLINE void AddParameterInitializationBlock(
- const ParserFormalParameters& parameters, ZoneList<Statement*>* body,
+ const ParserFormalParameters& parameters, ZoneChunkList<Statement*>* body,
bool is_async, bool* ok) {
if (parameters.is_simple) return;
auto* init_block = BuildParameterInitializationBlock(parameters, ok);
@@ -994,7 +997,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
init_block = BuildRejectPromiseOnException(init_block, ok);
if (!*ok) return;
}
- if (init_block != nullptr) body->Add(init_block, zone());
+ if (init_block != nullptr) body->push_back(init_block);
}
V8_INLINE void AddFormalParameter(ParserFormalParameters* parameters,
« no previous file with comments | « src/isolate.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698