10#ifndef RUNTIME_VM_GROWABLE_ARRAY_H_
11#define RUNTIME_VM_GROWABLE_ARRAY_H_
13#include <initializer_list>
39 for (
auto&
value : values) {
71template <
typename T,
typename B>
75 : zone_(zone), array_(zone, initial_capacity) {}
78 void Add(
const T& t) { array_.
Add(&T::ZoneHandle(zone_, t.ptr())); }
80 T&
operator[](intptr_t index)
const {
return *array_[index]; }
84 void SetAt(intptr_t index,
const T& t) {
85 array_[index] = &T::ZoneHandle(zone_, t.ptr());
#define ASSERT_NOTNULL(ptr)
const GrowableArray< T * > & growable_array() const
T & operator[](intptr_t index) const
BaseGrowableHandlePtrArray(Zone *zone, intptr_t initial_capacity)
void SetAt(intptr_t index, const T &t)
const T & At(intptr_t index) const
GrowableArray(Zone *zone, intptr_t initial_capacity)
DISALLOW_COPY_AND_ASSIGN(GrowableArray)
GrowableArray(GrowableArray &&other)=default
GrowableArray(intptr_t initial_capacity)
GrowableArray & operator=(GrowableArray &&other)=default
GrowableArray(std::initializer_list< T > values)
GrowableHandlePtrArray(Zone *zone, intptr_t initial_capacity)
DISALLOW_COPY_AND_ASSIGN(ZoneGrowableArray)
~ZoneGrowableArray()=default
ZoneGrowableArray(ZoneGrowableArray &&other)=default
ZoneGrowableArray & operator=(ZoneGrowableArray &&other)=default
ZoneGrowableArray(Zone *zone, intptr_t initial_capacity)
ZoneGrowableArray(intptr_t initial_capacity)
ZoneGrowableHandlePtrArray(Zone *zone, intptr_t initial_capacity)