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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 int copy_size) = 0; | 114 int copy_size) = 0; |
115 | 115 |
116 inline void CopyElements( | 116 inline void CopyElements( |
117 Handle<JSObject> from_holder, | 117 Handle<JSObject> from_holder, |
118 Handle<FixedArrayBase> to, | 118 Handle<FixedArrayBase> to, |
119 ElementsKind from_kind) { | 119 ElementsKind from_kind) { |
120 CopyElements( | 120 CopyElements( |
121 *from_holder, 0, from_kind, to, 0, kCopyToEndAndInitializeToHole); | 121 *from_holder, 0, from_kind, to, 0, kCopyToEndAndInitializeToHole); |
122 } | 122 } |
123 | 123 |
| 124 virtual void GrowCapacityAndConvert(Handle<JSObject> object, |
| 125 uint32_t capacity) = 0; |
| 126 |
124 virtual Handle<FixedArray> AddElementsToFixedArray( | 127 virtual Handle<FixedArray> AddElementsToFixedArray( |
125 Handle<JSObject> receiver, Handle<FixedArray> to, | 128 Handle<JSObject> receiver, Handle<FixedArray> to, |
126 FixedArray::KeyFilter filter) = 0; | 129 FixedArray::KeyFilter filter) = 0; |
127 | 130 |
128 // Returns a shared ElementsAccessor for the specified ElementsKind. | 131 // Returns a shared ElementsAccessor for the specified ElementsKind. |
129 static ElementsAccessor* ForKind(ElementsKind elements_kind) { | 132 static ElementsAccessor* ForKind(ElementsKind elements_kind) { |
130 DCHECK(static_cast<int>(elements_kind) < kElementsKindCount); | 133 DCHECK(static_cast<int>(elements_kind) < kElementsKindCount); |
131 return elements_accessors_[elements_kind]; | 134 return elements_accessors_[elements_kind]; |
132 } | 135 } |
133 | 136 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, | 178 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, |
176 bool allow_appending = false); | 179 bool allow_appending = false); |
177 | 180 |
178 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( | 181 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( |
179 Handle<JSArray> array, | 182 Handle<JSArray> array, |
180 Arguments* args); | 183 Arguments* args); |
181 | 184 |
182 } } // namespace v8::internal | 185 } } // namespace v8::internal |
183 | 186 |
184 #endif // V8_ELEMENTS_H_ | 187 #endif // V8_ELEMENTS_H_ |
OLD | NEW |