OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 3011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3022 public: | 3022 public: |
3023 enum AddMode { | 3023 enum AddMode { |
3024 kNone, | 3024 kNone, |
3025 // Use this if GC can delete elements from the array. | 3025 // Use this if GC can delete elements from the array. |
3026 kReloadLengthAfterAllocation, | 3026 kReloadLengthAfterAllocation, |
3027 }; | 3027 }; |
3028 static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj, | 3028 static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj, |
3029 AddMode mode = kNone); | 3029 AddMode mode = kNone); |
3030 static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj1, | 3030 static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj1, |
3031 Handle<Object> obj2, AddMode = kNone); | 3031 Handle<Object> obj2, AddMode = kNone); |
| 3032 static Handle<ArrayList> New(Isolate* isolate, int size); |
3032 inline int Length(); | 3033 inline int Length(); |
3033 inline void SetLength(int length); | 3034 inline void SetLength(int length); |
3034 inline Object* Get(int index); | 3035 inline Object* Get(int index); |
3035 inline Object** Slot(int index); | 3036 inline Object** Slot(int index); |
3036 inline void Set(int index, Object* obj, | 3037 inline void Set(int index, Object* obj, |
3037 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 3038 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
3038 inline void Clear(int index, Object* undefined); | 3039 inline void Clear(int index, Object* undefined); |
3039 bool IsFull(); | 3040 bool IsFull(); |
3040 DECLARE_CAST(ArrayList) | 3041 DECLARE_CAST(ArrayList) |
3041 | 3042 |
(...skipping 8588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11630 } | 11631 } |
11631 }; | 11632 }; |
11632 | 11633 |
11633 | 11634 |
11634 } // NOLINT, false-positive due to second-order macros. | 11635 } // NOLINT, false-positive due to second-order macros. |
11635 } // NOLINT, false-positive due to second-order macros. | 11636 } // NOLINT, false-positive due to second-order macros. |
11636 | 11637 |
11637 #include "src/objects/object-macros-undef.h" | 11638 #include "src/objects/object-macros-undef.h" |
11638 | 11639 |
11639 #endif // V8_OBJECTS_H_ | 11640 #endif // V8_OBJECTS_H_ |
OLD | NEW |