5#ifndef V8_ZONE_ZONE_LIST_INL_H_
6#define V8_ZONE_ZONE_LIST_INL_H_
29 AddAll(other.ToVector(), zone);
34 int length = other.length();
35 if (length == 0)
return;
38 if (capacity_ < result_length) Resize(result_length, zone);
39 if (std::is_trivially_copyable<T>::value) {
40 memcpy(&
data_[
length_], other.begin(),
sizeof(T) * length);
51 ResizeAddInternal(element, zone);
59 int new_capacity = 1 + 2 * capacity_;
63 Resize(new_capacity, zone);
72 if (std::is_trivially_copyable<T>::value) {
80 capacity_ = new_capacity;
86 for (
int i = 0;
i <
count;
i++) Add(value, zone);
130template <
class Visitor>
136template <
typename CompareFunction>
138 std::sort(begin(),
end(),
139 [cmp](
const T& a,
const T& b) {
return cmp(&a, &b) < 0; });
148template <
typename CompareFunction>
150 std::stable_sort(begin() + s, begin() + s + l,
151 [cmp](
const T& a,
const T& b) {
return cmp(&a, &b) < 0; });
153 for (
size_t i = s + 1;
i <
l;
i++) {
uint8_t data_[MAX_STACK_LENGTH]
V8_INLINE void Clear(Zone *zone)
void AddAll(const ZoneList< T > &other, Zone *zone)
void StableSort(CompareFunction cmp, size_t start, size_t length)
base::Vector< T > AddBlock(T value, int count, Zone *zone)
void Set(int index, const T &element)
void Sort(CompareFunction cmp)
void Iterate(Visitor *visitor)
void InsertAt(int index, const T &element, Zone *zone)
void Resize(int new_capacity, Zone *zone)
V8_INLINE void Rewind(int pos)
void Add(const T &element, Zone *zone)
void ResizeAdd(const T &element, Zone *zone)
void ResizeAddInternal(const T &element, Zone *zone)
T * AllocateArray(size_t length)
void DeleteArray(T *pointer, size_t length)
void MemCopy(void *dest, const void *src, size_t size)
#define DCHECK_LE(v1, v2)
#define DCHECK(condition)