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 53 matching lines...) Loading... |
64 // element. This method doesn't iterate up the prototype chain. The caller | 64 // element. This method doesn't iterate up the prototype chain. The caller |
65 // can optionally pass in the backing store to use for the check, which must | 65 // can optionally pass in the backing store to use for the check, which must |
66 // be compatible with the ElementsKind of the ElementsAccessor. If | 66 // be compatible with the ElementsKind of the ElementsAccessor. If |
67 // backing_store is NULL, the holder->elements() is used as the backing store. | 67 // backing_store is NULL, the holder->elements() is used as the backing store. |
68 MUST_USE_RESULT virtual MaybeObject* Get( | 68 MUST_USE_RESULT virtual MaybeObject* Get( |
69 Object* receiver, | 69 Object* receiver, |
70 JSObject* holder, | 70 JSObject* holder, |
71 uint32_t key, | 71 uint32_t key, |
72 FixedArrayBase* backing_store = NULL) = 0; | 72 FixedArrayBase* backing_store = NULL) = 0; |
73 | 73 |
| 74 // Returns an element's attributes, or ABSENT if there is no such |
| 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 |
| 77 // be compatible with the ElementsKind of the ElementsAccessor. If |
| 78 // backing_store is NULL, the holder->elements() is used as the backing store. |
| 79 MUST_USE_RESULT virtual PropertyAttributes GetAttributes( |
| 80 Object* receiver, |
| 81 JSObject* holder, |
| 82 uint32_t key, |
| 83 FixedArrayBase* backing_store = NULL) = 0; |
| 84 |
74 // Modifies the length data property as specified for JSArrays and resizes the | 85 // Modifies the length data property as specified for JSArrays and resizes the |
75 // underlying backing store accordingly. The method honors the semantics of | 86 // underlying backing store accordingly. The method honors the semantics of |
76 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that | 87 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that |
77 // have non-deletable elements can only be shrunk to the size of highest | 88 // have non-deletable elements can only be shrunk to the size of highest |
78 // element that is non-deletable. | 89 // element that is non-deletable. |
79 MUST_USE_RESULT virtual MaybeObject* SetLength(JSArray* holder, | 90 MUST_USE_RESULT virtual MaybeObject* SetLength(JSArray* holder, |
80 Object* new_length) = 0; | 91 Object* new_length) = 0; |
81 | 92 |
82 // Modifies both the length and capacity of a JSArray, resizing the underlying | 93 // Modifies both the length and capacity of a JSArray, resizing the underlying |
83 // backing store as necessary. This method does NOT honor the semantics of | 94 // backing store as necessary. This method does NOT honor the semantics of |
(...skipping 86 matching lines...) Loading... |
170 uint32_t from_start, | 181 uint32_t from_start, |
171 FixedArray* to_obj, | 182 FixedArray* to_obj, |
172 ElementsKind to_kind, | 183 ElementsKind to_kind, |
173 uint32_t to_start, | 184 uint32_t to_start, |
174 int copy_size); | 185 int copy_size); |
175 | 186 |
176 | 187 |
177 } } // namespace v8::internal | 188 } } // namespace v8::internal |
178 | 189 |
179 #endif // V8_ELEMENTS_H_ | 190 #endif // V8_ELEMENTS_H_ |
OLD | NEW |