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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // store is available, it can be passed in source and source_holder is | 139 // store is available, it can be passed in source and source_holder is |
140 // ignored. | 140 // ignored. |
141 virtual void CopyElements( | 141 virtual void CopyElements( |
142 Handle<FixedArrayBase> source, | 142 Handle<FixedArrayBase> source, |
143 uint32_t source_start, | 143 uint32_t source_start, |
144 ElementsKind source_kind, | 144 ElementsKind source_kind, |
145 Handle<FixedArrayBase> destination, | 145 Handle<FixedArrayBase> destination, |
146 uint32_t destination_start, | 146 uint32_t destination_start, |
147 int copy_size) = 0; | 147 int copy_size) = 0; |
148 | 148 |
149 // TODO(ishell): Keeping |source_holder| parameter in a non-handlified form | 149 // NOTE: this method violates the handlified function signature convention: |
150 // helps avoiding ArrayConcat() builtin performance degradation. | 150 // raw pointer parameter |source_holder| in the function that allocates. |
151 // Revisit this later. | 151 // This is done intentionally to avoid ArrayConcat() builtin performance |
| 152 // degradation. |
152 virtual void CopyElements( | 153 virtual void CopyElements( |
153 JSObject* source_holder, | 154 JSObject* source_holder, |
154 uint32_t source_start, | 155 uint32_t source_start, |
155 ElementsKind source_kind, | 156 ElementsKind source_kind, |
156 Handle<FixedArrayBase> destination, | 157 Handle<FixedArrayBase> destination, |
157 uint32_t destination_start, | 158 uint32_t destination_start, |
158 int copy_size) = 0; | 159 int copy_size) = 0; |
159 | 160 |
160 inline void CopyElements( | 161 inline void CopyElements( |
161 Handle<JSObject> from_holder, | 162 Handle<JSObject> from_holder, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, | 217 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, |
217 bool allow_appending = false); | 218 bool allow_appending = false); |
218 | 219 |
219 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( | 220 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( |
220 Handle<JSArray> array, | 221 Handle<JSArray> array, |
221 Arguments* args); | 222 Arguments* args); |
222 | 223 |
223 } } // namespace v8::internal | 224 } } // namespace v8::internal |
224 | 225 |
225 #endif // V8_ELEMENTS_H_ | 226 #endif // V8_ELEMENTS_H_ |
OLD | NEW |