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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 uint32_t key, | 105 uint32_t key, |
106 JSReceiver::DeleteMode mode) = 0; | 106 JSReceiver::DeleteMode mode) = 0; |
107 | 107 |
108 // If kCopyToEnd is specified as the copy_size to CopyElements, it copies all | 108 // If kCopyToEnd is specified as the copy_size to CopyElements, it copies all |
109 // of elements from source after source_start to the destination array. | 109 // of elements from source after source_start to the destination array. |
110 static const int kCopyToEnd = -1; | 110 static const int kCopyToEnd = -1; |
111 // If kCopyToEndAndInitializeToHole is specified as the copy_size to | 111 // If kCopyToEndAndInitializeToHole is specified as the copy_size to |
112 // CopyElements, it copies all of elements from source after source_start to | 112 // CopyElements, it copies all of elements from source after source_start to |
113 // destination array, padding any remaining uninitialized elements in the | 113 // destination array, padding any remaining uninitialized elements in the |
114 // destination array with the hole. | 114 // destination array with the hole. |
115 static const int kCopyToEndAndInitializeToHole = -2; | 115 static const int kCopyToEndAndInitializeToHole = -2; |
danno
2012/11/13 22:05:12
You probably should get rid of this contant above,
| |
116 | 116 |
117 // Copy elements from one backing store to another. Typically, callers specify | 117 // Copy elements from one backing store to another. Typically, callers specify |
118 // the source JSObject or JSArray in source_holder. If the holder's backing | 118 // the source JSObject or JSArray in source_holder. If the holder's backing |
119 // store is available, it can be passed in source and source_holder is | 119 // store is available, it can be passed in source and source_holder is |
120 // ignored. | 120 // ignored. |
121 MUST_USE_RESULT virtual MaybeObject* CopyElements( | 121 MUST_USE_RESULT virtual MaybeObject* CopyElements( |
122 JSObject* source_holder, | 122 JSObject* source_holder, |
123 uint32_t source_start, | 123 uint32_t source_start, |
124 FixedArrayBase* destination, | 124 FixedArrayBase* destination, |
125 ElementsKind destination_kind, | 125 ElementsKind destination_kind, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 | 177 |
178 | 178 |
179 void CopyObjectToObjectElements(FixedArray* from_obj, | 179 void CopyObjectToObjectElements(FixedArray* from_obj, |
180 ElementsKind from_kind, | 180 ElementsKind from_kind, |
181 uint32_t from_start, | 181 uint32_t from_start, |
182 FixedArray* to_obj, | 182 FixedArray* to_obj, |
183 ElementsKind to_kind, | 183 ElementsKind to_kind, |
184 uint32_t to_start, | 184 uint32_t to_start, |
185 int copy_size); | 185 int copy_size); |
186 | 186 |
187 MaybeObject* CopyDoubleToObjectElements(FixedDoubleArray* from_obj, | |
danno
2012/11/13 22:05:12
Do you really need to add these here? Or can you g
Toon Verwaest
2012/11/14 11:53:13
Done.
| |
188 uint32_t from_start, | |
189 FixedArray* to_obj, | |
190 ElementsKind to_kind, | |
191 uint32_t to_start, | |
192 int copy_size); | |
193 | |
194 void CopySmiToSmiElements(FixedArray* from_obj, | |
195 uint32_t from_start, | |
196 FixedArray* to_obj, | |
197 uint32_t to_start, | |
198 int copy_size); | |
199 | |
200 void CopySmiToDoubleElements(FixedArray* from_obj, | |
201 uint32_t from_start, | |
202 FixedDoubleArray* to_obj, | |
203 uint32_t to_start, | |
204 int copy_size); | |
205 | |
206 void CopyDoubleToDoubleElements(FixedDoubleArray* from_obj, | |
207 uint32_t from_start, | |
208 FixedDoubleArray* to_obj, | |
209 uint32_t to_start, | |
210 int copy_size); | |
187 | 211 |
188 } } // namespace v8::internal | 212 } } // namespace v8::internal |
189 | 213 |
190 #endif // V8_ELEMENTS_H_ | 214 #endif // V8_ELEMENTS_H_ |
OLD | NEW |