Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 5961dc060f82ac581ccda19073d2375e2dfe9b34..db40084573f5d52adfb602999bf955602dc92ddd 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -2631,9 +2631,15 @@ 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); |
| + enum AddMode { |
| + kNone, |
| + // Use this if GC can delete elements from array. |
|
Jarin
2015/03/24 13:50:04
nit: ... from the array.
ulan
2015/03/24 14:01:36
Done.
|
| + kReloadLengthAfterAllocation, |
| + }; |
| + static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj, |
| + AddMode mode = kNone); |
| static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj1, |
| - Handle<Object> obj2); |
| + Handle<Object> obj2, AddMode = kNone); |
| inline int Length(); |
| inline void SetLength(int length); |
| inline Object* Get(int index); |