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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 return elements_accessors_[elements_kind]; | 133 return elements_accessors_[elements_kind]; |
134 } | 134 } |
135 | 135 |
136 static ElementsAccessor* ForArray(Handle<FixedArrayBase> array); | 136 static ElementsAccessor* ForArray(Handle<FixedArrayBase> array); |
137 | 137 |
138 static void InitializeOncePerProcess(); | 138 static void InitializeOncePerProcess(); |
139 static void TearDown(); | 139 static void TearDown(); |
140 | 140 |
141 virtual void Set(FixedArrayBase* backing_store, uint32_t key, | 141 virtual void Set(FixedArrayBase* backing_store, uint32_t key, |
142 Object* value) = 0; | 142 Object* value) = 0; |
| 143 virtual void Reconfigure(Handle<JSObject> object, |
| 144 Handle<FixedArrayBase> backing_store, uint32_t index, |
| 145 Handle<Object> value, |
| 146 PropertyAttributes attributes) = 0; |
143 | 147 |
144 protected: | 148 protected: |
145 friend class SloppyArgumentsElementsAccessor; | 149 friend class SloppyArgumentsElementsAccessor; |
146 friend class LookupIterator; | 150 friend class LookupIterator; |
147 | 151 |
148 static ElementsAccessor* ForArray(FixedArrayBase* array); | 152 static ElementsAccessor* ForArray(FixedArrayBase* array); |
149 | 153 |
150 virtual uint32_t GetCapacity(JSObject* holder, | 154 virtual uint32_t GetCapacity(JSObject* holder, |
151 FixedArrayBase* backing_store) = 0; | 155 FixedArrayBase* backing_store) = 0; |
152 | 156 |
(...skipping 24 matching lines...) Expand all Loading... |
177 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, | 181 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, |
178 bool allow_appending = false); | 182 bool allow_appending = false); |
179 | 183 |
180 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( | 184 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( |
181 Handle<JSArray> array, | 185 Handle<JSArray> array, |
182 Arguments* args); | 186 Arguments* args); |
183 | 187 |
184 } } // namespace v8::internal | 188 } } // namespace v8::internal |
185 | 189 |
186 #endif // V8_ELEMENTS_H_ | 190 #endif // V8_ELEMENTS_H_ |
OLD | NEW |