OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 Handle<FixedArrayBase> source = Handle<FixedArrayBase>::null()) = 0; | 160 Handle<FixedArrayBase> source = Handle<FixedArrayBase>::null()) = 0; |
161 MUST_USE_RESULT virtual MaybeObject* CopyElements( | 161 MUST_USE_RESULT virtual MaybeObject* CopyElements( |
162 JSObject* source_holder, | 162 JSObject* source_holder, |
163 uint32_t source_start, | 163 uint32_t source_start, |
164 ElementsKind source_kind, | 164 ElementsKind source_kind, |
165 FixedArrayBase* destination, | 165 FixedArrayBase* destination, |
166 uint32_t destination_start, | 166 uint32_t destination_start, |
167 int copy_size, | 167 int copy_size, |
168 FixedArrayBase* source = NULL) = 0; | 168 FixedArrayBase* source = NULL) = 0; |
169 | 169 |
| 170 void CopyElements( |
| 171 Handle<JSObject> from_holder, |
| 172 Handle<FixedArrayBase> to, |
| 173 ElementsKind from_kind, |
| 174 Handle<FixedArrayBase> from = Handle<FixedArrayBase>::null()) { |
| 175 CopyElements(from_holder, 0, from_kind, to, 0, |
| 176 kCopyToEndAndInitializeToHole, from); |
| 177 } |
| 178 |
170 MUST_USE_RESULT MaybeObject* CopyElements(JSObject* from_holder, | 179 MUST_USE_RESULT MaybeObject* CopyElements(JSObject* from_holder, |
171 FixedArrayBase* to, | 180 FixedArrayBase* to, |
172 ElementsKind from_kind, | 181 ElementsKind from_kind, |
173 FixedArrayBase* from = NULL) { | 182 FixedArrayBase* from = NULL) { |
174 return CopyElements(from_holder, 0, from_kind, to, 0, | 183 return CopyElements(from_holder, 0, from_kind, to, 0, |
175 kCopyToEndAndInitializeToHole, from); | 184 kCopyToEndAndInitializeToHole, from); |
176 } | 185 } |
177 | 186 |
178 MUST_USE_RESULT virtual MaybeObject* AddElementsToFixedArray( | 187 MUST_USE_RESULT virtual MaybeObject* AddElementsToFixedArray( |
179 Object* receiver, | 188 Object* receiver, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 226 |
218 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, | 227 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, |
219 bool allow_appending = false); | 228 bool allow_appending = false); |
220 | 229 |
221 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, | 230 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, |
222 Arguments* args); | 231 Arguments* args); |
223 | 232 |
224 } } // namespace v8::internal | 233 } } // namespace v8::internal |
225 | 234 |
226 #endif // V8_ELEMENTS_H_ | 235 #endif // V8_ELEMENTS_H_ |
OLD | NEW |