| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // element. This method doesn't iterate up the prototype chain. The caller | 75 // element. This method doesn't iterate up the prototype chain. The caller |
| 76 // can optionally pass in the backing store to use for the check, which must | 76 // can optionally pass in the backing store to use for the check, which must |
| 77 // be compatible with the ElementsKind of the ElementsAccessor. If | 77 // be compatible with the ElementsKind of the ElementsAccessor. If |
| 78 // backing_store is NULL, the holder->elements() is used as the backing store. | 78 // backing_store is NULL, the holder->elements() is used as the backing store. |
| 79 MUST_USE_RESULT virtual PropertyAttributes GetAttributes( | 79 MUST_USE_RESULT virtual PropertyAttributes GetAttributes( |
| 80 Object* receiver, | 80 Object* receiver, |
| 81 JSObject* holder, | 81 JSObject* holder, |
| 82 uint32_t key, | 82 uint32_t key, |
| 83 FixedArrayBase* backing_store = NULL) = 0; | 83 FixedArrayBase* backing_store = NULL) = 0; |
| 84 | 84 |
| 85 // Returns an element's type, or NONEXISTENT if there is no such |
| 86 // element. This method doesn't iterate up the prototype chain. The caller |
| 87 // can optionally pass in the backing store to use for the check, which must |
| 88 // be compatible with the ElementsKind of the ElementsAccessor. If |
| 89 // backing_store is NULL, the holder->elements() is used as the backing store. |
| 90 MUST_USE_RESULT virtual PropertyType GetType( |
| 91 Object* receiver, |
| 92 JSObject* holder, |
| 93 uint32_t key, |
| 94 FixedArrayBase* backing_store = NULL) = 0; |
| 95 |
| 96 // Returns an element's accessors, or NULL if the element does not exist or |
| 97 // is plain. This method doesn't iterate up the prototype chain. The caller |
| 98 // can optionally pass in the backing store to use for the check, which must |
| 99 // be compatible with the ElementsKind of the ElementsAccessor. If |
| 100 // backing_store is NULL, the holder->elements() is used as the backing store. |
| 101 MUST_USE_RESULT virtual AccessorPair* GetAccessorPair( |
| 102 Object* receiver, |
| 103 JSObject* holder, |
| 104 uint32_t key, |
| 105 FixedArrayBase* backing_store = NULL) = 0; |
| 106 |
| 85 // Modifies the length data property as specified for JSArrays and resizes the | 107 // Modifies the length data property as specified for JSArrays and resizes the |
| 86 // underlying backing store accordingly. The method honors the semantics of | 108 // underlying backing store accordingly. The method honors the semantics of |
| 87 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that | 109 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that |
| 88 // have non-deletable elements can only be shrunk to the size of highest | 110 // have non-deletable elements can only be shrunk to the size of highest |
| 89 // element that is non-deletable. | 111 // element that is non-deletable. |
| 90 MUST_USE_RESULT virtual MaybeObject* SetLength(JSArray* holder, | 112 MUST_USE_RESULT virtual MaybeObject* SetLength(JSArray* holder, |
| 91 Object* new_length) = 0; | 113 Object* new_length) = 0; |
| 92 | 114 |
| 93 // Modifies both the length and capacity of a JSArray, resizing the underlying | 115 // Modifies both the length and capacity of a JSArray, resizing the underlying |
| 94 // backing store as necessary. This method does NOT honor the semantics of | 116 // backing store as necessary. This method does NOT honor the semantics of |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 uint32_t from_start, | 203 uint32_t from_start, |
| 182 FixedArray* to_obj, | 204 FixedArray* to_obj, |
| 183 ElementsKind to_kind, | 205 ElementsKind to_kind, |
| 184 uint32_t to_start, | 206 uint32_t to_start, |
| 185 int copy_size); | 207 int copy_size); |
| 186 | 208 |
| 187 | 209 |
| 188 } } // namespace v8::internal | 210 } } // namespace v8::internal |
| 189 | 211 |
| 190 #endif // V8_ELEMENTS_H_ | 212 #endif // V8_ELEMENTS_H_ |
| OLD | NEW |