| 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 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2277 static inline int GetHeaderSize(InstanceType instance_type); | 2277 static inline int GetHeaderSize(InstanceType instance_type); |
| 2278 inline int GetHeaderSize(); | 2278 inline int GetHeaderSize(); |
| 2279 | 2279 |
| 2280 static inline int GetInternalFieldCount(Map* map); | 2280 static inline int GetInternalFieldCount(Map* map); |
| 2281 inline int GetInternalFieldCount(); | 2281 inline int GetInternalFieldCount(); |
| 2282 inline int GetInternalFieldOffset(int index); | 2282 inline int GetInternalFieldOffset(int index); |
| 2283 inline Object* GetInternalField(int index); | 2283 inline Object* GetInternalField(int index); |
| 2284 inline void SetInternalField(int index, Object* value); | 2284 inline void SetInternalField(int index, Object* value); |
| 2285 inline void SetInternalField(int index, Smi* value); | 2285 inline void SetInternalField(int index, Smi* value); |
| 2286 | 2286 |
| 2287 void CollectOwnPropertyNames(KeyAccumulator* keys, | |
| 2288 PropertyFilter filter = ALL_PROPERTIES); | |
| 2289 | |
| 2290 // Returns the number of properties on this object filtering out properties | 2287 // Returns the number of properties on this object filtering out properties |
| 2291 // with the specified attributes (ignoring interceptors). | 2288 // with the specified attributes (ignoring interceptors). |
| 2292 // TODO(jkummerow): Deprecated, only used by Object.observe. | 2289 // TODO(jkummerow): Deprecated, only used by Object.observe. |
| 2293 int NumberOfOwnElements(PropertyFilter filter); | 2290 int NumberOfOwnElements(PropertyFilter filter); |
| 2294 // Returns the number of elements on this object filtering out elements | 2291 // Returns the number of elements on this object filtering out elements |
| 2295 // with the specified attributes (ignoring interceptors). | 2292 // with the specified attributes (ignoring interceptors). |
| 2296 // TODO(jkummerow): Deprecated, only used by Object.observe. | 2293 // TODO(jkummerow): Deprecated, only used by Object.observe. |
| 2297 int GetOwnElementKeys(FixedArray* storage, PropertyFilter filter); | 2294 int GetOwnElementKeys(FixedArray* storage, PropertyFilter filter); |
| 2298 | 2295 |
| 2296 void CollectOwnPropertyKeys( |
| 2297 KeyAccumulator* keys, PropertyFilter filter = ALL_PROPERTIES, |
| 2298 JSReceiver::KeyCollectionType type = JSReceiver::OWN_ONLY); |
| 2299 |
| 2299 static void CollectOwnElementKeys(Handle<JSObject> object, | 2300 static void CollectOwnElementKeys(Handle<JSObject> object, |
| 2300 KeyAccumulator* keys, | 2301 KeyAccumulator* keys, |
| 2301 PropertyFilter filter); | 2302 PropertyFilter filter); |
| 2302 | |
| 2303 static Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object, | 2303 static Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object, |
| 2304 bool cache_result); | 2304 bool cache_result); |
| 2305 | 2305 |
| 2306 // Returns a new map with all transitions dropped from the object's current | 2306 // Returns a new map with all transitions dropped from the object's current |
| 2307 // map and the ElementsKind set. | 2307 // map and the ElementsKind set. |
| 2308 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, | 2308 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, |
| 2309 ElementsKind to_kind); | 2309 ElementsKind to_kind); |
| 2310 static void TransitionElementsKind(Handle<JSObject> object, | 2310 static void TransitionElementsKind(Handle<JSObject> object, |
| 2311 ElementsKind to_kind); | 2311 ElementsKind to_kind); |
| 2312 | 2312 |
| (...skipping 8417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10730 } | 10730 } |
| 10731 return value; | 10731 return value; |
| 10732 } | 10732 } |
| 10733 }; | 10733 }; |
| 10734 | 10734 |
| 10735 | 10735 |
| 10736 } // NOLINT, false-positive due to second-order macros. | 10736 } // NOLINT, false-positive due to second-order macros. |
| 10737 } // NOLINT, false-positive due to second-order macros. | 10737 } // NOLINT, false-positive due to second-order macros. |
| 10738 | 10738 |
| 10739 #endif // V8_OBJECTS_H_ | 10739 #endif // V8_OBJECTS_H_ |
| OLD | NEW |