| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2267 static inline int SizeOf(Map* map, HeapObject* object); | 2267 static inline int SizeOf(Map* map, HeapObject* object); |
| 2268 }; | 2268 }; |
| 2269 | 2269 |
| 2270 Context* GetCreationContext(); | 2270 Context* GetCreationContext(); |
| 2271 | 2271 |
| 2272 // Enqueue change record for Object.observe. May cause GC. | 2272 // Enqueue change record for Object.observe. May cause GC. |
| 2273 MUST_USE_RESULT static MaybeHandle<Object> EnqueueChangeRecord( | 2273 MUST_USE_RESULT static MaybeHandle<Object> EnqueueChangeRecord( |
| 2274 Handle<JSObject> object, const char* type, Handle<Name> name, | 2274 Handle<JSObject> object, const char* type, Handle<Name> name, |
| 2275 Handle<Object> old_value); | 2275 Handle<Object> old_value); |
| 2276 | 2276 |
| 2277 // Gets the current elements capacity and the number of used elements. | 2277 // Gets the number of currently used elements. |
| 2278 void GetElementsCapacityAndUsage(int* capacity, int* used); | 2278 int GetFastElementsUsage(); |
| 2279 | 2279 |
| 2280 // Deletes an existing named property in a normalized object. | 2280 // Deletes an existing named property in a normalized object. |
| 2281 static void DeleteNormalizedProperty(Handle<JSObject> object, | 2281 static void DeleteNormalizedProperty(Handle<JSObject> object, |
| 2282 Handle<Name> name, int entry); | 2282 Handle<Name> name, int entry); |
| 2283 | 2283 |
| 2284 private: | 2284 private: |
| 2285 friend class JSReceiver; | 2285 friend class JSReceiver; |
| 2286 friend class Object; | 2286 friend class Object; |
| 2287 | 2287 |
| 2288 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map); | 2288 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2323 // the inline-stored identity hash. | 2323 // the inline-stored identity hash. |
| 2324 static Handle<Object> SetHiddenPropertiesHashTable( | 2324 static Handle<Object> SetHiddenPropertiesHashTable( |
| 2325 Handle<JSObject> object, | 2325 Handle<JSObject> object, |
| 2326 Handle<Object> value); | 2326 Handle<Object> value); |
| 2327 | 2327 |
| 2328 MUST_USE_RESULT Object* GetIdentityHash(); | 2328 MUST_USE_RESULT Object* GetIdentityHash(); |
| 2329 | 2329 |
| 2330 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSObject> object); | 2330 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSObject> object); |
| 2331 | 2331 |
| 2332 static Handle<SeededNumberDictionary> GetNormalizedElementDictionary( | 2332 static Handle<SeededNumberDictionary> GetNormalizedElementDictionary( |
| 2333 Handle<JSObject> object); | 2333 Handle<JSObject> object, Handle<FixedArrayBase> elements); |
| 2334 | 2334 |
| 2335 // Helper for fast versions of preventExtensions, seal, and freeze. | 2335 // Helper for fast versions of preventExtensions, seal, and freeze. |
| 2336 // attrs is one of NONE, SEALED, or FROZEN (depending on the operation). | 2336 // attrs is one of NONE, SEALED, or FROZEN (depending on the operation). |
| 2337 template <PropertyAttributes attrs> | 2337 template <PropertyAttributes attrs> |
| 2338 MUST_USE_RESULT static MaybeHandle<Object> PreventExtensionsWithTransition( | 2338 MUST_USE_RESULT static MaybeHandle<Object> PreventExtensionsWithTransition( |
| 2339 Handle<JSObject> object); | 2339 Handle<JSObject> object); |
| 2340 | 2340 |
| 2341 DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject); | 2341 DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject); |
| 2342 }; | 2342 }; |
| 2343 | 2343 |
| (...skipping 8443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10787 } else { | 10787 } else { |
| 10788 value &= ~(1 << bit_position); | 10788 value &= ~(1 << bit_position); |
| 10789 } | 10789 } |
| 10790 return value; | 10790 return value; |
| 10791 } | 10791 } |
| 10792 }; | 10792 }; |
| 10793 | 10793 |
| 10794 } } // namespace v8::internal | 10794 } } // namespace v8::internal |
| 10795 | 10795 |
| 10796 #endif // V8_OBJECTS_H_ | 10796 #endif // V8_OBJECTS_H_ |
| OLD | NEW |