| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 Handle<JSObject> holder, | 120 Handle<JSObject> holder, |
| 121 uint32_t key) { | 121 uint32_t key) { |
| 122 return GetType(receiver, holder, key, handle(holder->elements())); | 122 return GetType(receiver, holder, key, handle(holder->elements())); |
| 123 } | 123 } |
| 124 | 124 |
| 125 // Returns an element's accessors, or NULL if the element does not exist or | 125 // Returns an element's accessors, or NULL if the element does not exist or |
| 126 // is plain. This method doesn't iterate up the prototype chain. The caller | 126 // is plain. This method doesn't iterate up the prototype chain. The caller |
| 127 // can optionally pass in the backing store to use for the check, which must | 127 // can optionally pass in the backing store to use for the check, which must |
| 128 // be compatible with the ElementsKind of the ElementsAccessor. If | 128 // be compatible with the ElementsKind of the ElementsAccessor. If |
| 129 // backing_store is NULL, the holder->elements() is used as the backing store. | 129 // backing_store is NULL, the holder->elements() is used as the backing store. |
| 130 MUST_USE_RESULT virtual AccessorPair* GetAccessorPair( | 130 MUST_USE_RESULT virtual MaybeHandle<AccessorPair> GetAccessorPair( |
| 131 Object* receiver, | 131 Handle<Object> receiver, |
| 132 JSObject* holder, | 132 Handle<JSObject> holder, |
| 133 uint32_t key, | 133 uint32_t key, |
| 134 FixedArrayBase* backing_store = NULL) = 0; | 134 Handle<FixedArrayBase> backing_store) = 0; |
| 135 |
| 136 MUST_USE_RESULT inline MaybeHandle<AccessorPair> GetAccessorPair( |
| 137 Handle<Object> receiver, |
| 138 Handle<JSObject> holder, |
| 139 uint32_t key) { |
| 140 return GetAccessorPair(receiver, holder, key, handle(holder->elements())); |
| 141 } |
| 135 | 142 |
| 136 // Modifies the length data property as specified for JSArrays and resizes the | 143 // Modifies the length data property as specified for JSArrays and resizes the |
| 137 // underlying backing store accordingly. The method honors the semantics of | 144 // underlying backing store accordingly. The method honors the semantics of |
| 138 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that | 145 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that |
| 139 // have non-deletable elements can only be shrunk to the size of highest | 146 // have non-deletable elements can only be shrunk to the size of highest |
| 140 // element that is non-deletable. | 147 // element that is non-deletable. |
| 141 MUST_USE_RESULT virtual Handle<Object> SetLength( | 148 MUST_USE_RESULT virtual Handle<Object> SetLength( |
| 142 Handle<JSArray> holder, | 149 Handle<JSArray> holder, |
| 143 Handle<Object> new_length) = 0; | 150 Handle<Object> new_length) = 0; |
| 144 | 151 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 280 |
| 274 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, | 281 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, |
| 275 bool allow_appending = false); | 282 bool allow_appending = false); |
| 276 | 283 |
| 277 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, | 284 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, |
| 278 Arguments* args); | 285 Arguments* args); |
| 279 | 286 |
| 280 } } // namespace v8::internal | 287 } } // namespace v8::internal |
| 281 | 288 |
| 282 #endif // V8_ELEMENTS_H_ | 289 #endif // V8_ELEMENTS_H_ |
| OLD | NEW |