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 Object* value) = 0; | 142 Object* value) = 0; |
143 virtual void Reconfigure(Handle<JSObject> object, | 143 virtual void Reconfigure(Handle<JSObject> object, |
144 Handle<FixedArrayBase> backing_store, uint32_t index, | 144 Handle<FixedArrayBase> backing_store, uint32_t index, |
145 Handle<Object> value, | 145 Handle<Object> value, |
146 PropertyAttributes attributes) = 0; | 146 PropertyAttributes attributes) = 0; |
147 virtual void Add(Handle<JSObject> object, uint32_t index, | 147 virtual void Add(Handle<JSObject> object, uint32_t index, |
148 Handle<Object> value, PropertyAttributes attributes, | 148 Handle<Object> value, PropertyAttributes attributes, |
149 uint32_t new_capacity) = 0; | 149 uint32_t new_capacity) = 0; |
150 | 150 |
151 protected: | 151 protected: |
152 friend class SloppyArgumentsElementsAccessor; | |
153 friend class LookupIterator; | 152 friend class LookupIterator; |
154 | 153 |
155 static ElementsAccessor* ForArray(FixedArrayBase* array); | 154 static ElementsAccessor* ForArray(FixedArrayBase* array); |
156 | 155 |
157 virtual uint32_t GetCapacity(JSObject* holder, | 156 virtual uint32_t GetCapacity(JSObject* holder, |
158 FixedArrayBase* backing_store) = 0; | 157 FixedArrayBase* backing_store) = 0; |
159 | 158 |
160 // Element handlers distinguish between indexes and keys when they manipulate | 159 // Element handlers distinguish between indexes and keys when they manipulate |
161 // elements. Indexes refer to elements in terms of their location in the | 160 // elements. Indexes refer to elements in terms of their location in the |
162 // underlying storage's backing store representation, and are between 0 and | 161 // underlying storage's backing store representation, and are between 0 and |
(...skipping 21 matching lines...) Expand all Loading... |
184 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, | 183 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, |
185 bool allow_appending = false); | 184 bool allow_appending = false); |
186 | 185 |
187 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( | 186 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( |
188 Handle<JSArray> array, | 187 Handle<JSArray> array, |
189 Arguments* args); | 188 Arguments* args); |
190 | 189 |
191 } } // namespace v8::internal | 190 } } // namespace v8::internal |
192 | 191 |
193 #endif // V8_ELEMENTS_H_ | 192 #endif // V8_ELEMENTS_H_ |
OLD | NEW |