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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual bool HasElement(Object* receiver, | 58 virtual bool HasElement(Object* receiver, |
59 JSObject* holder, | 59 JSObject* holder, |
60 uint32_t key, | 60 uint32_t key, |
61 FixedArrayBase* backing_store = NULL) = 0; | 61 FixedArrayBase* backing_store = NULL) = 0; |
62 | 62 |
63 // Returns the element with the specified key or undefined if there is no such | 63 // Returns the element with the specified key or undefined if there is no such |
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 Handle<Object> Get( |
| 69 Handle<Object> receiver, |
| 70 Handle<JSObject> holder, |
| 71 uint32_t key, |
| 72 Handle<FixedArrayBase> backing_store = |
| 73 Handle<FixedArrayBase>::null()) = 0; |
| 74 |
68 MUST_USE_RESULT virtual MaybeObject* Get( | 75 MUST_USE_RESULT virtual MaybeObject* Get( |
69 Object* receiver, | 76 Object* receiver, |
70 JSObject* holder, | 77 JSObject* holder, |
71 uint32_t key, | 78 uint32_t key, |
72 FixedArrayBase* backing_store = NULL) = 0; | 79 FixedArrayBase* backing_store = NULL) = 0; |
73 | 80 |
74 // Returns an element's attributes, or ABSENT if there is no such | 81 // 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 | 82 // 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 | 83 // can optionally pass in the backing store to use for the check, which must |
77 // be compatible with the ElementsKind of the ElementsAccessor. If | 84 // be compatible with the ElementsKind of the ElementsAccessor. If |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 208 |
202 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, | 209 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, |
203 bool allow_appending = false); | 210 bool allow_appending = false); |
204 | 211 |
205 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, | 212 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, |
206 Arguments* args); | 213 Arguments* args); |
207 | 214 |
208 } } // namespace v8::internal | 215 } } // namespace v8::internal |
209 | 216 |
210 #endif // V8_ELEMENTS_H_ | 217 #endif // V8_ELEMENTS_H_ |
OLD | NEW |