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/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1918 | 1918 |
1919 MUST_USE_RESULT static Maybe<PropertyAttributes> GetPropertyAttributes( | 1919 MUST_USE_RESULT static Maybe<PropertyAttributes> GetPropertyAttributes( |
1920 LookupIterator* it); | 1920 LookupIterator* it); |
1921 | 1921 |
1922 // Set the object's prototype (only JSReceiver and null are allowed values). | 1922 // Set the object's prototype (only JSReceiver and null are allowed values). |
1923 MUST_USE_RESULT static Maybe<bool> SetPrototype(Handle<JSReceiver> object, | 1923 MUST_USE_RESULT static Maybe<bool> SetPrototype(Handle<JSReceiver> object, |
1924 Handle<Object> value, | 1924 Handle<Object> value, |
1925 bool from_javascript, | 1925 bool from_javascript, |
1926 ShouldThrow should_throw); | 1926 ShouldThrow should_throw); |
1927 | 1927 |
1928 | 1928 inline static Handle<Object> GetDataProperty(Handle<JSReceiver> object, |
1929 static Handle<Object> GetDataProperty(Handle<JSReceiver> object, | 1929 Handle<Name> name); |
1930 Handle<Name> name); | |
1931 static Handle<Object> GetDataProperty(LookupIterator* it); | 1930 static Handle<Object> GetDataProperty(LookupIterator* it); |
1932 | 1931 |
1933 | 1932 |
1934 // Retrieves a permanent object identity hash code. The undefined value might | 1933 // Retrieves a permanent object identity hash code. The undefined value might |
1935 // be returned in case no hash was created yet. | 1934 // be returned in case no hash was created yet. |
1936 static inline Handle<Object> GetIdentityHash(Isolate* isolate, | 1935 static inline Handle<Object> GetIdentityHash(Isolate* isolate, |
1937 Handle<JSReceiver> object); | 1936 Handle<JSReceiver> object); |
1938 | 1937 |
1939 // Retrieves a permanent object identity hash code. May create and store a | 1938 // Retrieves a permanent object identity hash code. May create and store a |
1940 // hash code if needed and none exists. | 1939 // hash code if needed and none exists. |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2206 // if the property doesn't exist (or if called on a detached proxy), | 2205 // if the property doesn't exist (or if called on a detached proxy), |
2207 // otherwise returns the value set for the key. | 2206 // otherwise returns the value set for the key. |
2208 Object* GetHiddenProperty(Handle<Name> key); | 2207 Object* GetHiddenProperty(Handle<Name> key); |
2209 // Deletes a hidden property. Deleting a non-existing property is | 2208 // Deletes a hidden property. Deleting a non-existing property is |
2210 // considered successful. | 2209 // considered successful. |
2211 static void DeleteHiddenProperty(Handle<JSObject> object, | 2210 static void DeleteHiddenProperty(Handle<JSObject> object, |
2212 Handle<Name> key); | 2211 Handle<Name> key); |
2213 // Returns true if the object has a property with the hidden string as name. | 2212 // Returns true if the object has a property with the hidden string as name. |
2214 static bool HasHiddenProperties(Handle<JSObject> object); | 2213 static bool HasHiddenProperties(Handle<JSObject> object); |
2215 | 2214 |
2216 static void SetIdentityHash(Handle<JSObject> object, Handle<Smi> hash); | |
2217 | |
2218 static void ValidateElements(Handle<JSObject> object); | 2215 static void ValidateElements(Handle<JSObject> object); |
2219 | 2216 |
2220 // Makes sure that this object can contain HeapObject as elements. | 2217 // Makes sure that this object can contain HeapObject as elements. |
2221 static inline void EnsureCanContainHeapObjectElements(Handle<JSObject> obj); | 2218 static inline void EnsureCanContainHeapObjectElements(Handle<JSObject> obj); |
2222 | 2219 |
2223 // Makes sure that this object can contain the specified elements. | 2220 // Makes sure that this object can contain the specified elements. |
2224 static inline void EnsureCanContainElements( | 2221 static inline void EnsureCanContainElements( |
2225 Handle<JSObject> object, | 2222 Handle<JSObject> object, |
2226 Object** elements, | 2223 Object** elements, |
2227 uint32_t count, | 2224 uint32_t count, |
(...skipping 8643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10871 } | 10868 } |
10872 return value; | 10869 return value; |
10873 } | 10870 } |
10874 }; | 10871 }; |
10875 | 10872 |
10876 | 10873 |
10877 } // NOLINT, false-positive due to second-order macros. | 10874 } // NOLINT, false-positive due to second-order macros. |
10878 } // NOLINT, false-positive due to second-order macros. | 10875 } // NOLINT, false-positive due to second-order macros. |
10879 | 10876 |
10880 #endif // V8_OBJECTS_H_ | 10877 #endif // V8_OBJECTS_H_ |
OLD | NEW |