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

Unified Diff: src/parsing/preparser.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/parsing/pattern-rewriter.cc ('k') | src/parsing/rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 83be879623f3e1819353308c646dec668e9b1b6c..2ad3ee004570a638ce7e27760e0e08420644ab20 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -410,7 +410,9 @@ class PreParserList {
PreParserList() : length_(0), identifiers_(nullptr) {}
PreParserList* operator->() { return this; }
void Add(T, Zone* zone);
+ void push_back(T);
int length() const { return length_; }
+ int size() const { return length_; }
static PreParserList Null() { return PreParserList(-1); }
bool IsNull() const { return length_ == -1; }
@@ -439,8 +441,19 @@ inline void PreParserList<PreParserExpression>::Add(
++length_;
}
+template <>
+inline void PreParserList<PreParserExpression>::push_back(
+ PreParserExpression expression) {
+ UNREACHABLE();
+}
+
+template <typename T>
+void PreParserList<T>::Add(T, Zone*) {
+ ++length_;
+}
+
template <typename T>
-void PreParserList<T>::Add(T, Zone* zone) {
+void PreParserList<T>::push_back(T) {
++length_;
}
@@ -679,8 +692,7 @@ class PreParserFactory {
}
PreParserStatement NewBlock(ZoneList<const AstRawString*>* labels,
- int capacity, bool ignore_completion_value,
- int pos) {
+ bool ignore_completion_value, int pos) {
return PreParserStatement::Default();
}
« no previous file with comments | « src/parsing/pattern-rewriter.cc ('k') | src/parsing/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698