OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 // Returns the number of non-undefined values. | 2059 // Returns the number of non-undefined values. |
2060 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object, | 2060 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object, |
2061 uint32_t limit); | 2061 uint32_t limit); |
2062 // As PrepareElementsForSort, but only on objects where elements is | 2062 // As PrepareElementsForSort, but only on objects where elements is |
2063 // a dictionary, and it will stay a dictionary. Collates undefined and | 2063 // a dictionary, and it will stay a dictionary. Collates undefined and |
2064 // unexisting elements below limit from position zero of the elements. | 2064 // unexisting elements below limit from position zero of the elements. |
2065 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, | 2065 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, |
2066 uint32_t limit); | 2066 uint32_t limit); |
2067 | 2067 |
2068 MUST_USE_RESULT static Maybe<bool> SetPropertyWithInterceptor( | 2068 MUST_USE_RESULT static Maybe<bool> SetPropertyWithInterceptor( |
2069 LookupIterator* it, Handle<Object> value); | 2069 LookupIterator* it, ShouldThrow should_throw, Handle<Object> value); |
2070 | 2070 |
2071 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to | 2071 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to |
2072 // grant an exemption to AccessorInfo callbacks in some cases. | 2072 // grant an exemption to AccessorInfo callbacks in some cases. |
2073 enum AccessorInfoHandling { DEFAULT_HANDLING, DONT_FORCE_FIELD }; | 2073 enum AccessorInfoHandling { DEFAULT_HANDLING, DONT_FORCE_FIELD }; |
2074 | 2074 |
2075 MUST_USE_RESULT static MaybeHandle<Object> DefineOwnPropertyIgnoreAttributes( | 2075 MUST_USE_RESULT static MaybeHandle<Object> DefineOwnPropertyIgnoreAttributes( |
2076 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, | 2076 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, |
2077 AccessorInfoHandling handling = DEFAULT_HANDLING); | 2077 AccessorInfoHandling handling = DEFAULT_HANDLING); |
2078 | 2078 |
2079 MUST_USE_RESULT static Maybe<bool> DefineOwnPropertyIgnoreAttributes( | 2079 MUST_USE_RESULT static Maybe<bool> DefineOwnPropertyIgnoreAttributes( |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 MUST_USE_RESULT static Maybe<bool> SetPropertyWithFailedAccessCheck( | 2510 MUST_USE_RESULT static Maybe<bool> SetPropertyWithFailedAccessCheck( |
2511 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw); | 2511 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw); |
2512 | 2512 |
2513 // Add a property to a slow-case object. | 2513 // Add a property to a slow-case object. |
2514 static void AddSlowProperty(Handle<JSObject> object, | 2514 static void AddSlowProperty(Handle<JSObject> object, |
2515 Handle<Name> name, | 2515 Handle<Name> name, |
2516 Handle<Object> value, | 2516 Handle<Object> value, |
2517 PropertyAttributes attributes); | 2517 PropertyAttributes attributes); |
2518 | 2518 |
2519 MUST_USE_RESULT static Maybe<bool> DeletePropertyWithInterceptor( | 2519 MUST_USE_RESULT static Maybe<bool> DeletePropertyWithInterceptor( |
2520 LookupIterator* it); | 2520 LookupIterator* it, ShouldThrow should_throw); |
2521 | 2521 |
2522 bool ReferencesObjectFromElements(FixedArray* elements, | 2522 bool ReferencesObjectFromElements(FixedArray* elements, |
2523 ElementsKind kind, | 2523 ElementsKind kind, |
2524 Object* object); | 2524 Object* object); |
2525 | 2525 |
2526 // Return the hash table backing store or the inline stored identity hash, | 2526 // Return the hash table backing store or the inline stored identity hash, |
2527 // whatever is found. | 2527 // whatever is found. |
2528 MUST_USE_RESULT Object* GetHiddenPropertiesHashTable(); | 2528 MUST_USE_RESULT Object* GetHiddenPropertiesHashTable(); |
2529 | 2529 |
2530 // Return the hash table backing store for hidden properties. If there is no | 2530 // Return the hash table backing store for hidden properties. If there is no |
(...skipping 8252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10783 } | 10783 } |
10784 return value; | 10784 return value; |
10785 } | 10785 } |
10786 }; | 10786 }; |
10787 | 10787 |
10788 | 10788 |
10789 } // NOLINT, false-positive due to second-order macros. | 10789 } // NOLINT, false-positive due to second-order macros. |
10790 } // NOLINT, false-positive due to second-order macros. | 10790 } // NOLINT, false-positive due to second-order macros. |
10791 | 10791 |
10792 #endif // V8_OBJECTS_H_ | 10792 #endif // V8_OBJECTS_H_ |
OLD | NEW |