diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-19 09:25:14 +0100 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-19 09:56:31 +0100 |
commit | 6313e1fe4c27755adde87e62db1c2f9fac534ae4 (patch) | |
tree | c57bb29f65e02fbfcc07895a8cc2903fff9300ba /src/3rdparty/v8/src/small-pointer-list.h | |
parent | b5a49a260d03249c386f1b63c249089383dd81fa (diff) | |
parent | cac65e7a222b848a735a974b0aeb43209b0cfa18 (diff) | |
download | qtjsbackend-6313e1fe4c27755adde87e62db1c2f9fac534ae4.tar.gz |
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle
Change-Id: I892bbc73c276842894a720f761ce31ad1b015672
Diffstat (limited to 'src/3rdparty/v8/src/small-pointer-list.h')
-rw-r--r-- | src/3rdparty/v8/src/small-pointer-list.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/3rdparty/v8/src/small-pointer-list.h b/src/3rdparty/v8/src/small-pointer-list.h index 75fea06..295a06f 100644 --- a/src/3rdparty/v8/src/small-pointer-list.h +++ b/src/3rdparty/v8/src/small-pointer-list.h @@ -44,22 +44,22 @@ class SmallPointerList { public: SmallPointerList() : data_(kEmptyTag) {} - explicit SmallPointerList(int capacity) : data_(kEmptyTag) { - Reserve(capacity); + SmallPointerList(int capacity, Zone* zone) : data_(kEmptyTag) { + Reserve(capacity, zone); } - void Reserve(int capacity) { + void Reserve(int capacity, Zone* zone) { if (capacity < 2) return; if ((data_ & kTagMask) == kListTag) { if (list()->capacity() >= capacity) return; int old_length = list()->length(); - list()->AddBlock(NULL, capacity - list()->capacity()); + list()->AddBlock(NULL, capacity - list()->capacity(), zone); list()->Rewind(old_length); return; } - PointerList* list = new PointerList(capacity); + PointerList* list = new(zone) PointerList(capacity, zone); if ((data_ & kTagMask) == kSingletonTag) { - list->Add(single_value()); + list->Add(single_value(), zone); } ASSERT(IsAligned(reinterpret_cast<intptr_t>(list), kPointerAlignment)); data_ = reinterpret_cast<intptr_t>(list) | kListTag; @@ -83,21 +83,21 @@ class SmallPointerList { return list()->length(); } - void Add(T* pointer) { + void Add(T* pointer, Zone* zone) { ASSERT(IsAligned(reinterpret_cast<intptr_t>(pointer), kPointerAlignment)); if ((data_ & kTagMask) == kEmptyTag) { data_ = reinterpret_cast<intptr_t>(pointer) | kSingletonTag; return; } if ((data_ & kTagMask) == kSingletonTag) { - PointerList* list = new PointerList(2); - list->Add(single_value()); - list->Add(pointer); + PointerList* list = new(zone) PointerList(2, zone); + list->Add(single_value(), zone); + list->Add(pointer, zone); ASSERT(IsAligned(reinterpret_cast<intptr_t>(list), kPointerAlignment)); data_ = reinterpret_cast<intptr_t>(list) | kListTag; return; } - list()->Add(pointer); + list()->Add(pointer, zone); } // Note: returns T* and not T*& (unlike List from list.h). |