| 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 2265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2276 Context* GetCreationContext(); | 2276 Context* GetCreationContext(); |
| 2277 | 2277 |
| 2278 // Enqueue change record for Object.observe. May cause GC. | 2278 // Enqueue change record for Object.observe. May cause GC. |
| 2279 MUST_USE_RESULT static MaybeHandle<Object> EnqueueChangeRecord( | 2279 MUST_USE_RESULT static MaybeHandle<Object> EnqueueChangeRecord( |
| 2280 Handle<JSObject> object, const char* type, Handle<Name> name, | 2280 Handle<JSObject> object, const char* type, Handle<Name> name, |
| 2281 Handle<Object> old_value); | 2281 Handle<Object> old_value); |
| 2282 | 2282 |
| 2283 // Gets the current elements capacity and the number of used elements. | 2283 // Gets the current elements capacity and the number of used elements. |
| 2284 void GetElementsCapacityAndUsage(int* capacity, int* used); | 2284 void GetElementsCapacityAndUsage(int* capacity, int* used); |
| 2285 | 2285 |
| 2286 // Deletes an existing named property in a normalized object. |
| 2287 static void DeleteNormalizedProperty(Handle<JSObject> object, |
| 2288 Handle<Name> name, int entry); |
| 2289 |
| 2286 private: | 2290 private: |
| 2287 friend class DictionaryElementsAccessor; | 2291 friend class DictionaryElementsAccessor; |
| 2288 friend class JSReceiver; | 2292 friend class JSReceiver; |
| 2289 friend class Object; | 2293 friend class Object; |
| 2290 | 2294 |
| 2291 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map); | 2295 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map); |
| 2292 static void MigrateFastToSlow(Handle<JSObject> object, | 2296 static void MigrateFastToSlow(Handle<JSObject> object, |
| 2293 Handle<Map> new_map, | 2297 Handle<Map> new_map, |
| 2294 int expected_additional_properties); | 2298 int expected_additional_properties); |
| 2295 | 2299 |
| 2296 // Used from Object::GetProperty(). | 2300 // Used from Object::GetProperty(). |
| 2297 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( | 2301 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( |
| 2298 LookupIterator* it); | 2302 LookupIterator* it); |
| 2299 | 2303 |
| 2300 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithFailedAccessCheck( | 2304 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithFailedAccessCheck( |
| 2301 LookupIterator* it, Handle<Object> value); | 2305 LookupIterator* it, Handle<Object> value); |
| 2302 | 2306 |
| 2303 // Add a property to a slow-case object. | 2307 // Add a property to a slow-case object. |
| 2304 static void AddSlowProperty(Handle<JSObject> object, | 2308 static void AddSlowProperty(Handle<JSObject> object, |
| 2305 Handle<Name> name, | 2309 Handle<Name> name, |
| 2306 Handle<Object> value, | 2310 Handle<Object> value, |
| 2307 PropertyAttributes attributes); | 2311 PropertyAttributes attributes); |
| 2308 | 2312 |
| 2309 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithInterceptor( | 2313 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithInterceptor( |
| 2310 LookupIterator* it); | 2314 LookupIterator* it); |
| 2311 | 2315 |
| 2312 // Deletes an existing named property in a normalized object. | |
| 2313 static void DeleteNormalizedProperty(Handle<JSObject> object, | |
| 2314 Handle<Name> name); | |
| 2315 | |
| 2316 bool ReferencesObjectFromElements(FixedArray* elements, | 2316 bool ReferencesObjectFromElements(FixedArray* elements, |
| 2317 ElementsKind kind, | 2317 ElementsKind kind, |
| 2318 Object* object); | 2318 Object* object); |
| 2319 | 2319 |
| 2320 static bool CanSetCallback(Handle<JSObject> object, Handle<Name> name); | 2320 static bool CanSetCallback(Handle<JSObject> object, Handle<Name> name); |
| 2321 static void SetElementCallback(Handle<JSObject> object, | 2321 static void SetElementCallback(Handle<JSObject> object, |
| 2322 uint32_t index, | 2322 uint32_t index, |
| 2323 Handle<Object> structure, | 2323 Handle<Object> structure, |
| 2324 PropertyAttributes attributes); | 2324 PropertyAttributes attributes); |
| 2325 static void SetPropertyCallback(Handle<JSObject> object, | 2325 static void SetPropertyCallback(Handle<JSObject> object, |
| (...skipping 8487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10813 } else { | 10813 } else { |
| 10814 value &= ~(1 << bit_position); | 10814 value &= ~(1 << bit_position); |
| 10815 } | 10815 } |
| 10816 return value; | 10816 return value; |
| 10817 } | 10817 } |
| 10818 }; | 10818 }; |
| 10819 | 10819 |
| 10820 } } // namespace v8::internal | 10820 } } // namespace v8::internal |
| 10821 | 10821 |
| 10822 #endif // V8_OBJECTS_H_ | 10822 #endif // V8_OBJECTS_H_ |
| OLD | NEW |