| Index: src/parser.h
|
| diff --git a/src/parser.h b/src/parser.h
|
| index 2a79b63bfdc4075f0964849bbce7cbee5ccd6d8c..c1404bee07e2c6c077b6a9fc356823c73c179eb3 100644
|
| --- a/src/parser.h
|
| +++ b/src/parser.h
|
| @@ -200,12 +200,12 @@ class BufferedZoneList {
|
| // Adds element at end of list. This element is buffered and can
|
| // be read using last() or removed using RemoveLast until a new Add or until
|
| // RemoveLast or GetList has been called.
|
| - void Add(T* value) {
|
| + void Add(T* value, Zone* zone) {
|
| if (last_ != NULL) {
|
| if (list_ == NULL) {
|
| - list_ = new ZoneList<T*>(initial_size);
|
| + list_ = new(zone) ZoneList<T*>(initial_size, zone);
|
| }
|
| - list_->Add(last_);
|
| + list_->Add(last_, zone);
|
| }
|
| last_ = value;
|
| }
|
| @@ -250,12 +250,12 @@ class BufferedZoneList {
|
| return length + ((last_ == NULL) ? 0 : 1);
|
| }
|
|
|
| - ZoneList<T*>* GetList() {
|
| + ZoneList<T*>* GetList(Zone* zone) {
|
| if (list_ == NULL) {
|
| - list_ = new ZoneList<T*>(initial_size);
|
| + list_ = new(zone) ZoneList<T*>(initial_size, zone);
|
| }
|
| if (last_ != NULL) {
|
| - list_->Add(last_);
|
| + list_->Add(last_, zone);
|
| last_ = NULL;
|
| }
|
| return list_;
|
| @@ -371,7 +371,7 @@ class RegExpParser {
|
| int disjunction_capture_index,
|
| Zone* zone)
|
| : previous_state_(previous_state),
|
| - builder_(new RegExpBuilder(zone)),
|
| + builder_(new(zone) RegExpBuilder(zone)),
|
| group_type_(group_type),
|
| disjunction_capture_index_(disjunction_capture_index) {}
|
| // Parser state of containing expression, if any.
|
|
|