OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_ELEMENTS_H_ | 5 #ifndef V8_ELEMENTS_H_ |
6 #define V8_ELEMENTS_H_ | 6 #define V8_ELEMENTS_H_ |
7 | 7 |
8 #include "src/elements-kind.h" | 8 #include "src/elements-kind.h" |
9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 uint32_t key, | 74 uint32_t key, |
75 Handle<FixedArrayBase> backing_store) = 0; | 75 Handle<FixedArrayBase> backing_store) = 0; |
76 | 76 |
77 MUST_USE_RESULT inline PropertyAttributes GetAttributes( | 77 MUST_USE_RESULT inline PropertyAttributes GetAttributes( |
78 Handle<Object> receiver, | 78 Handle<Object> receiver, |
79 Handle<JSObject> holder, | 79 Handle<JSObject> holder, |
80 uint32_t key) { | 80 uint32_t key) { |
81 return GetAttributes(receiver, holder, key, handle(holder->elements())); | 81 return GetAttributes(receiver, holder, key, handle(holder->elements())); |
82 } | 82 } |
83 | 83 |
84 // Returns an element's type, or NONEXISTENT if there is no such | |
85 // element. This method doesn't iterate up the prototype chain. The caller | |
86 // can optionally pass in the backing store to use for the check, which must | |
87 // be compatible with the ElementsKind of the ElementsAccessor. If | |
88 // backing_store is NULL, the holder->elements() is used as the backing store. | |
89 MUST_USE_RESULT virtual PropertyType GetType( | |
90 Handle<Object> receiver, | |
91 Handle<JSObject> holder, | |
92 uint32_t key, | |
93 Handle<FixedArrayBase> backing_store) = 0; | |
94 | |
95 MUST_USE_RESULT inline PropertyType GetType( | |
96 Handle<Object> receiver, | |
97 Handle<JSObject> holder, | |
98 uint32_t key) { | |
99 return GetType(receiver, holder, key, handle(holder->elements())); | |
100 } | |
101 | |
102 // Returns an element's accessors, or NULL if the element does not exist or | 84 // Returns an element's accessors, or NULL if the element does not exist or |
103 // is plain. This method doesn't iterate up the prototype chain. The caller | 85 // is plain. This method doesn't iterate up the prototype chain. The caller |
104 // can optionally pass in the backing store to use for the check, which must | 86 // can optionally pass in the backing store to use for the check, which must |
105 // be compatible with the ElementsKind of the ElementsAccessor. If | 87 // be compatible with the ElementsKind of the ElementsAccessor. If |
106 // backing_store is NULL, the holder->elements() is used as the backing store. | 88 // backing_store is NULL, the holder->elements() is used as the backing store. |
107 MUST_USE_RESULT virtual MaybeHandle<AccessorPair> GetAccessorPair( | 89 MUST_USE_RESULT virtual MaybeHandle<AccessorPair> GetAccessorPair( |
108 Handle<Object> receiver, | 90 Handle<Object> receiver, |
109 Handle<JSObject> holder, | 91 Handle<JSObject> holder, |
110 uint32_t key, | 92 uint32_t key, |
111 Handle<FixedArrayBase> backing_store) = 0; | 93 Handle<FixedArrayBase> backing_store) = 0; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, | 216 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, |
235 bool allow_appending = false); | 217 bool allow_appending = false); |
236 | 218 |
237 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( | 219 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( |
238 Handle<JSArray> array, | 220 Handle<JSArray> array, |
239 Arguments* args); | 221 Arguments* args); |
240 | 222 |
241 } } // namespace v8::internal | 223 } } // namespace v8::internal |
242 | 224 |
243 #endif // V8_ELEMENTS_H_ | 225 #endif // V8_ELEMENTS_H_ |
OLD | NEW |