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 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1975 StrictModeFlag strict_mode, | 1975 StrictModeFlag strict_mode, |
1976 StoreFromKeyed store_from_keyed = MAY_BE_STORE_FROM_KEYED); | 1976 StoreFromKeyed store_from_keyed = MAY_BE_STORE_FROM_KEYED); |
1977 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSReceiver* setter, | 1977 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSReceiver* setter, |
1978 Object* value); | 1978 Object* value); |
1979 | 1979 |
1980 static Handle<Object> DeleteProperty(Handle<JSReceiver> object, | 1980 static Handle<Object> DeleteProperty(Handle<JSReceiver> object, |
1981 Handle<Name> name, | 1981 Handle<Name> name, |
1982 DeleteMode mode = NORMAL_DELETION); | 1982 DeleteMode mode = NORMAL_DELETION); |
1983 static Handle<Object> DeleteElement(Handle<JSReceiver> object, | 1983 static Handle<Object> DeleteElement(Handle<JSReceiver> object, |
1984 uint32_t index, | 1984 uint32_t index, |
1985 DeleteMode mode); | 1985 DeleteMode mode = NORMAL_DELETION); |
1986 | 1986 |
1987 // Set the index'th array element. | 1987 // Set the index'th array element. |
1988 // Can cause GC, or return failure if GC is required. | 1988 // Can cause GC, or return failure if GC is required. |
1989 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index, | 1989 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index, |
1990 Object* value, | 1990 Object* value, |
1991 PropertyAttributes attributes, | 1991 PropertyAttributes attributes, |
1992 StrictModeFlag strict_mode, | 1992 StrictModeFlag strict_mode, |
1993 bool check_prototype); | 1993 bool check_prototype); |
1994 | 1994 |
1995 // Tests for the fast common case for property enumeration. | 1995 // Tests for the fast common case for property enumeration. |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2313 // Deletes a hidden property. Deleting a non-existing property is | 2313 // Deletes a hidden property. Deleting a non-existing property is |
2314 // considered successful. | 2314 // considered successful. |
2315 void DeleteHiddenProperty(Name* key); | 2315 void DeleteHiddenProperty(Name* key); |
2316 // Returns true if the object has a property with the hidden string as name. | 2316 // Returns true if the object has a property with the hidden string as name. |
2317 bool HasHiddenProperties(); | 2317 bool HasHiddenProperties(); |
2318 | 2318 |
2319 static int GetIdentityHash(Handle<JSObject> obj); | 2319 static int GetIdentityHash(Handle<JSObject> obj); |
2320 MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag); | 2320 MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag); |
2321 MUST_USE_RESULT MaybeObject* SetIdentityHash(Smi* hash, CreationFlag flag); | 2321 MUST_USE_RESULT MaybeObject* SetIdentityHash(Smi* hash, CreationFlag flag); |
2322 | 2322 |
2323 static Handle<Object> DeleteElement(Handle<JSObject> obj, | |
2324 uint32_t index, | |
2325 DeleteMode mode = NORMAL_DELETION); | |
2326 MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode); | |
2327 | |
2328 inline void ValidateElements(); | 2323 inline void ValidateElements(); |
2329 | 2324 |
2330 // Makes sure that this object can contain HeapObject as elements. | 2325 // Makes sure that this object can contain HeapObject as elements. |
2331 MUST_USE_RESULT inline MaybeObject* EnsureCanContainHeapObjectElements(); | 2326 MUST_USE_RESULT inline MaybeObject* EnsureCanContainHeapObjectElements(); |
2332 | 2327 |
2333 // Makes sure that this object can contain the specified elements. | 2328 // Makes sure that this object can contain the specified elements. |
2334 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 2329 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( |
2335 Object** elements, | 2330 Object** elements, |
2336 uint32_t count, | 2331 uint32_t count, |
2337 EnsureElementsMode mode); | 2332 EnsureElementsMode mode); |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2805 Handle<Name> name, | 2800 Handle<Name> name, |
2806 DeleteMode mode); | 2801 DeleteMode mode); |
2807 static Handle<Object> DeletePropertyWithInterceptor(Handle<JSObject> object, | 2802 static Handle<Object> DeletePropertyWithInterceptor(Handle<JSObject> object, |
2808 Handle<Name> name); | 2803 Handle<Name> name); |
2809 | 2804 |
2810 // Deletes the named property in a normalized object. | 2805 // Deletes the named property in a normalized object. |
2811 static Handle<Object> DeleteNormalizedProperty(Handle<JSObject> object, | 2806 static Handle<Object> DeleteNormalizedProperty(Handle<JSObject> object, |
2812 Handle<Name> name, | 2807 Handle<Name> name, |
2813 DeleteMode mode); | 2808 DeleteMode mode); |
2814 | 2809 |
2815 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index); | 2810 static Handle<Object> DeleteElement(Handle<JSObject> object, |
| 2811 uint32_t index, |
| 2812 DeleteMode mode); |
| 2813 static Handle<Object> DeleteElementWithInterceptor(Handle<JSObject> object, |
| 2814 uint32_t index); |
2816 | 2815 |
2817 MUST_USE_RESULT MaybeObject* DeleteFastElement(uint32_t index); | 2816 MUST_USE_RESULT MaybeObject* DeleteFastElement(uint32_t index); |
2818 MUST_USE_RESULT MaybeObject* DeleteDictionaryElement(uint32_t index, | 2817 MUST_USE_RESULT MaybeObject* DeleteDictionaryElement(uint32_t index, |
2819 DeleteMode mode); | 2818 DeleteMode mode); |
2820 | 2819 |
2821 bool ReferencesObjectFromElements(FixedArray* elements, | 2820 bool ReferencesObjectFromElements(FixedArray* elements, |
2822 ElementsKind kind, | 2821 ElementsKind kind, |
2823 Object* object); | 2822 Object* object); |
2824 | 2823 |
2825 // Returns true if most of the elements backing storage is used. | 2824 // Returns true if most of the elements backing storage is used. |
(...skipping 7450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10276 } else { | 10275 } else { |
10277 value &= ~(1 << bit_position); | 10276 value &= ~(1 << bit_position); |
10278 } | 10277 } |
10279 return value; | 10278 return value; |
10280 } | 10279 } |
10281 }; | 10280 }; |
10282 | 10281 |
10283 } } // namespace v8::internal | 10282 } } // namespace v8::internal |
10284 | 10283 |
10285 #endif // V8_OBJECTS_H_ | 10284 #endif // V8_OBJECTS_H_ |
OLD | NEW |