| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index c3344ec98759a28b767e29f5ba440065f210fe21..a74db7b590c7680293e653ffee8fc04b600baaf8 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -941,6 +941,7 @@ template <class C> inline bool Is(Object* obj);
|
| V(FixedArray) \
|
| V(FixedDoubleArray) \
|
| V(WeakFixedArray) \
|
| + V(ArrayList) \
|
| V(ConstantPoolArray) \
|
| V(Context) \
|
| V(ScriptContextTable) \
|
| @@ -2627,6 +2628,28 @@ class WeakFixedArray : public FixedArray {
|
| };
|
|
|
|
|
| +// Generic array grows dynamically with O(1) amortized insertion.
|
| +class ArrayList : public FixedArray {
|
| + public:
|
| + static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj);
|
| + static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj1,
|
| + Handle<Object> obj2);
|
| + inline int Length();
|
| + inline void SetLength(int length);
|
| + inline Object* Get(int index);
|
| + inline Object** Slot(int index);
|
| + inline void Set(int index, Object* obj);
|
| + inline void Clear(int index, Object* undefined);
|
| + DECLARE_CAST(ArrayList)
|
| +
|
| + private:
|
| + static Handle<ArrayList> EnsureSpace(Handle<ArrayList> array, int length);
|
| + static const int kLengthIndex = 0;
|
| + static const int kFirstIndex = 1;
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(ArrayList);
|
| +};
|
| +
|
| +
|
| // ConstantPoolArray describes a fixed-sized array containing constant pool
|
| // entries.
|
| //
|
|
|