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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // backing store as necessary. This method does NOT honor the semantics of | 117 // backing store as necessary. This method does NOT honor the semantics of |
118 // EcmaScript 5.1 15.4.5.2, arrays can be shrunk beyond non-deletable | 118 // EcmaScript 5.1 15.4.5.2, arrays can be shrunk beyond non-deletable |
119 // elements. This method should only be called for array expansion OR by | 119 // elements. This method should only be called for array expansion OR by |
120 // runtime JavaScript code that use InternalArrays and don't care about | 120 // runtime JavaScript code that use InternalArrays and don't care about |
121 // EcmaScript 5.1 semantics. | 121 // EcmaScript 5.1 semantics. |
122 MUST_USE_RESULT virtual MaybeObject* SetCapacityAndLength(JSArray* array, | 122 MUST_USE_RESULT virtual MaybeObject* SetCapacityAndLength(JSArray* array, |
123 int capacity, | 123 int capacity, |
124 int length) = 0; | 124 int length) = 0; |
125 | 125 |
126 // Deletes an element in an object, returning a new elements backing store. | 126 // Deletes an element in an object, returning a new elements backing store. |
127 MUST_USE_RESULT virtual MaybeObject* Delete(JSObject* holder, | 127 MUST_USE_RESULT virtual Handle<Object> Delete( |
128 uint32_t key, | 128 Handle<JSObject> holder, |
129 JSReceiver::DeleteMode mode) = 0; | 129 uint32_t key, |
| 130 JSReceiver::DeleteMode mode) = 0; |
130 | 131 |
131 // If kCopyToEnd is specified as the copy_size to CopyElements, it copies all | 132 // If kCopyToEnd is specified as the copy_size to CopyElements, it copies all |
132 // of elements from source after source_start to the destination array. | 133 // of elements from source after source_start to the destination array. |
133 static const int kCopyToEnd = -1; | 134 static const int kCopyToEnd = -1; |
134 // If kCopyToEndAndInitializeToHole is specified as the copy_size to | 135 // If kCopyToEndAndInitializeToHole is specified as the copy_size to |
135 // 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 |
136 // destination array, padding any remaining uninitialized elements in the | 137 // destination array, padding any remaining uninitialized elements in the |
137 // destination array with the hole. | 138 // destination array with the hole. |
138 static const int kCopyToEndAndInitializeToHole = -2; | 139 static const int kCopyToEndAndInitializeToHole = -2; |
139 | 140 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 201 |
201 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, | 202 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, |
202 bool allow_appending = false); | 203 bool allow_appending = false); |
203 | 204 |
204 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, | 205 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, |
205 Arguments* args); | 206 Arguments* args); |
206 | 207 |
207 } } // namespace v8::internal | 208 } } // namespace v8::internal |
208 | 209 |
209 #endif // V8_ELEMENTS_H_ | 210 #endif // V8_ELEMENTS_H_ |
OLD | NEW |