| 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 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 inline bool HasFixedUint16Elements(); | 2036 inline bool HasFixedUint16Elements(); |
| 2037 inline bool HasFixedInt32Elements(); | 2037 inline bool HasFixedInt32Elements(); |
| 2038 inline bool HasFixedUint32Elements(); | 2038 inline bool HasFixedUint32Elements(); |
| 2039 inline bool HasFixedFloat32Elements(); | 2039 inline bool HasFixedFloat32Elements(); |
| 2040 inline bool HasFixedFloat64Elements(); | 2040 inline bool HasFixedFloat64Elements(); |
| 2041 | 2041 |
| 2042 inline bool HasFastArgumentsElements(); | 2042 inline bool HasFastArgumentsElements(); |
| 2043 inline bool HasSlowArgumentsElements(); | 2043 inline bool HasSlowArgumentsElements(); |
| 2044 inline bool HasFastStringWrapperElements(); | 2044 inline bool HasFastStringWrapperElements(); |
| 2045 inline bool HasSlowStringWrapperElements(); | 2045 inline bool HasSlowStringWrapperElements(); |
| 2046 bool HasEnumerableElements(); | |
| 2047 | |
| 2048 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. | 2046 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. |
| 2049 | 2047 |
| 2050 // Requires: HasFastElements(). | 2048 // Requires: HasFastElements(). |
| 2051 static void EnsureWritableFastElements(Handle<JSObject> object); | 2049 static void EnsureWritableFastElements(Handle<JSObject> object); |
| 2052 | 2050 |
| 2053 // Collects elements starting at index 0. | 2051 // Collects elements starting at index 0. |
| 2054 // Undefined values are placed after non-undefined values. | 2052 // Undefined values are placed after non-undefined values. |
| 2055 // Returns the number of non-undefined values. | 2053 // Returns the number of non-undefined values. |
| 2056 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object, | 2054 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object, |
| 2057 uint32_t limit); | 2055 uint32_t limit); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2289 // with the specified attributes (ignoring interceptors). | 2287 // with the specified attributes (ignoring interceptors). |
| 2290 // TODO(jkummerow): Deprecated, only used by Object.observe. | 2288 // TODO(jkummerow): Deprecated, only used by Object.observe. |
| 2291 int GetOwnElementKeys(FixedArray* storage, PropertyFilter filter); | 2289 int GetOwnElementKeys(FixedArray* storage, PropertyFilter filter); |
| 2292 | 2290 |
| 2293 static void CollectOwnElementKeys(Handle<JSObject> object, | 2291 static void CollectOwnElementKeys(Handle<JSObject> object, |
| 2294 KeyAccumulator* keys, | 2292 KeyAccumulator* keys, |
| 2295 PropertyFilter filter); | 2293 PropertyFilter filter); |
| 2296 | 2294 |
| 2297 static Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object); | 2295 static Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object); |
| 2298 | 2296 |
| 2299 static Handle<FixedArray> GetFastEnumPropertyKeys(Isolate* isolate, | |
| 2300 Handle<JSObject> object); | |
| 2301 | |
| 2302 // Returns a new map with all transitions dropped from the object's current | 2297 // Returns a new map with all transitions dropped from the object's current |
| 2303 // map and the ElementsKind set. | 2298 // map and the ElementsKind set. |
| 2304 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, | 2299 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, |
| 2305 ElementsKind to_kind); | 2300 ElementsKind to_kind); |
| 2306 static void TransitionElementsKind(Handle<JSObject> object, | 2301 static void TransitionElementsKind(Handle<JSObject> object, |
| 2307 ElementsKind to_kind); | 2302 ElementsKind to_kind); |
| 2308 | 2303 |
| 2309 // Always use this to migrate an object to a new map. | 2304 // Always use this to migrate an object to a new map. |
| 2310 // |expected_additional_properties| is only used for fast-to-slow transitions | 2305 // |expected_additional_properties| is only used for fast-to-slow transitions |
| 2311 // and ignored otherwise. | 2306 // and ignored otherwise. |
| (...skipping 8557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10869 } | 10864 } |
| 10870 return value; | 10865 return value; |
| 10871 } | 10866 } |
| 10872 }; | 10867 }; |
| 10873 | 10868 |
| 10874 | 10869 |
| 10875 } // NOLINT, false-positive due to second-order macros. | 10870 } // NOLINT, false-positive due to second-order macros. |
| 10876 } // NOLINT, false-positive due to second-order macros. | 10871 } // NOLINT, false-positive due to second-order macros. |
| 10877 | 10872 |
| 10878 #endif // V8_OBJECTS_H_ | 10873 #endif // V8_OBJECTS_H_ |
| OLD | NEW |