OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ELEMENTS_H_ | 5 #ifndef V8_ELEMENTS_H_ |
6 #define V8_ELEMENTS_H_ | 6 #define V8_ELEMENTS_H_ |
7 | 7 |
8 #include "src/elements-kind.h" | 8 #include "src/elements-kind.h" |
9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 uint32_t start, uint32_t end) = 0; | 142 uint32_t start, uint32_t end) = 0; |
143 | 143 |
144 virtual Handle<JSArray> Splice(Handle<JSArray> receiver, | 144 virtual Handle<JSArray> Splice(Handle<JSArray> receiver, |
145 Handle<FixedArrayBase> backing_store, | 145 Handle<FixedArrayBase> backing_store, |
146 uint32_t start, uint32_t delete_count, | 146 uint32_t start, uint32_t delete_count, |
147 Arguments* args, uint32_t add_count) = 0; | 147 Arguments* args, uint32_t add_count) = 0; |
148 | 148 |
149 virtual Handle<Object> Pop(Handle<JSArray> receiver, | 149 virtual Handle<Object> Pop(Handle<JSArray> receiver, |
150 Handle<FixedArrayBase> backing_store) = 0; | 150 Handle<FixedArrayBase> backing_store) = 0; |
151 | 151 |
| 152 virtual Handle<Object> Shift(Handle<JSArray> receiver, |
| 153 Handle<FixedArrayBase> backing_store) = 0; |
| 154 |
152 protected: | 155 protected: |
153 friend class LookupIterator; | 156 friend class LookupIterator; |
154 | 157 |
155 static ElementsAccessor* ForArray(FixedArrayBase* array); | 158 static ElementsAccessor* ForArray(FixedArrayBase* array); |
156 | 159 |
157 virtual uint32_t GetCapacity(JSObject* holder, | 160 virtual uint32_t GetCapacity(JSObject* holder, |
158 FixedArrayBase* backing_store) = 0; | 161 FixedArrayBase* backing_store) = 0; |
159 | 162 |
160 // Element handlers distinguish between entries and indices when they | 163 // Element handlers distinguish between entries and indices when they |
161 // manipulate elements. Entries refer to elements in terms of their location | 164 // manipulate elements. Entries refer to elements in terms of their location |
(...skipping 19 matching lines...) Expand all Loading... |
181 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t index, | 184 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t index, |
182 bool allow_appending = false); | 185 bool allow_appending = false); |
183 | 186 |
184 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( | 187 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( |
185 Handle<JSArray> array, | 188 Handle<JSArray> array, |
186 Arguments* args); | 189 Arguments* args); |
187 | 190 |
188 } } // namespace v8::internal | 191 } } // namespace v8::internal |
189 | 192 |
190 #endif // V8_ELEMENTS_H_ | 193 #endif // V8_ELEMENTS_H_ |
OLD | NEW |