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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // If kCopyToEndAndInitializeToHole is specified as the copy_size to | 135 // If kCopyToEndAndInitializeToHole is specified as the copy_size to |
136 // CopyElements, it copies all of elements from source after source_start to | 136 // CopyElements, it copies all of elements from source after source_start to |
137 // destination array, padding any remaining uninitialized elements in the | 137 // destination array, padding any remaining uninitialized elements in the |
138 // destination array with the hole. | 138 // destination array with the hole. |
139 static const int kCopyToEndAndInitializeToHole = -2; | 139 static const int kCopyToEndAndInitializeToHole = -2; |
140 | 140 |
141 // Copy elements from one backing store to another. Typically, callers specify | 141 // Copy elements from one backing store to another. Typically, callers specify |
142 // the source JSObject or JSArray in source_holder. If the holder's backing | 142 // the source JSObject or JSArray in source_holder. If the holder's backing |
143 // store is available, it can be passed in source and source_holder is | 143 // store is available, it can be passed in source and source_holder is |
144 // ignored. | 144 // ignored. |
| 145 virtual void CopyElements( |
| 146 Handle<JSObject> source_holder, |
| 147 uint32_t source_start, |
| 148 ElementsKind source_kind, |
| 149 Handle<FixedArrayBase> destination, |
| 150 uint32_t destination_start, |
| 151 int copy_size, |
| 152 Handle<FixedArrayBase> source = Handle<FixedArrayBase>::null()) = 0; |
145 MUST_USE_RESULT virtual MaybeObject* CopyElements( | 153 MUST_USE_RESULT virtual MaybeObject* CopyElements( |
146 JSObject* source_holder, | 154 JSObject* source_holder, |
147 uint32_t source_start, | 155 uint32_t source_start, |
148 ElementsKind source_kind, | 156 ElementsKind source_kind, |
149 FixedArrayBase* destination, | 157 FixedArrayBase* destination, |
150 uint32_t destination_start, | 158 uint32_t destination_start, |
151 int copy_size, | 159 int copy_size, |
152 FixedArrayBase* source = NULL) = 0; | 160 FixedArrayBase* source = NULL) = 0; |
153 | 161 |
154 MUST_USE_RESULT MaybeObject* CopyElements(JSObject* from_holder, | 162 MUST_USE_RESULT MaybeObject* CopyElements(JSObject* from_holder, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 209 |
202 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, | 210 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, |
203 bool allow_appending = false); | 211 bool allow_appending = false); |
204 | 212 |
205 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, | 213 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, |
206 Arguments* args); | 214 Arguments* args); |
207 | 215 |
208 } } // namespace v8::internal | 216 } } // namespace v8::internal |
209 | 217 |
210 #endif // V8_ELEMENTS_H_ | 218 #endif // V8_ELEMENTS_H_ |
OLD | NEW |