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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 virtual Handle<JSArray> Slice(Handle<JSObject> receiver, | 139 virtual Handle<JSArray> Slice(Handle<JSObject> receiver, |
140 Handle<FixedArrayBase> backing_store, | 140 Handle<FixedArrayBase> backing_store, |
141 uint32_t start, uint32_t end) = 0; | 141 uint32_t start, uint32_t end) = 0; |
142 | 142 |
143 virtual Handle<JSArray> Splice(Handle<JSArray> receiver, | 143 virtual Handle<JSArray> Splice(Handle<JSArray> receiver, |
144 Handle<FixedArrayBase> backing_store, | 144 Handle<FixedArrayBase> backing_store, |
145 uint32_t start, uint32_t delete_count, | 145 uint32_t start, uint32_t delete_count, |
146 Arguments args, uint32_t add_count) = 0; | 146 Arguments args, uint32_t add_count) = 0; |
147 | 147 |
| 148 virtual Handle<Object> Pop(Handle<JSArray> receiver, |
| 149 Handle<FixedArrayBase> backing_store) = 0; |
| 150 |
148 protected: | 151 protected: |
149 friend class LookupIterator; | 152 friend class LookupIterator; |
150 | 153 |
151 static ElementsAccessor* ForArray(FixedArrayBase* array); | 154 static ElementsAccessor* ForArray(FixedArrayBase* array); |
152 | 155 |
153 virtual uint32_t GetCapacity(JSObject* holder, | 156 virtual uint32_t GetCapacity(JSObject* holder, |
154 FixedArrayBase* backing_store) = 0; | 157 FixedArrayBase* backing_store) = 0; |
155 | 158 |
156 // Element handlers distinguish between entries and indices when they | 159 // Element handlers distinguish between entries and indices when they |
157 // manipulate elements. Entries refer to elements in terms of their location | 160 // manipulate elements. Entries refer to elements in terms of their location |
(...skipping 19 matching lines...) Expand all Loading... |
177 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t index, | 180 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t index, |
178 bool allow_appending = false); | 181 bool allow_appending = false); |
179 | 182 |
180 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( | 183 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( |
181 Handle<JSArray> array, | 184 Handle<JSArray> array, |
182 Arguments* args); | 185 Arguments* args); |
183 | 186 |
184 } } // namespace v8::internal | 187 } } // namespace v8::internal |
185 | 188 |
186 #endif // V8_ELEMENTS_H_ | 189 #endif // V8_ELEMENTS_H_ |
OLD | NEW |