OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2287 | 2287 |
2288 // Extend the receiver with a single fast property appeared first in the | 2288 // Extend the receiver with a single fast property appeared first in the |
2289 // passed map. This also extends the property backing store if necessary. | 2289 // passed map. This also extends the property backing store if necessary. |
2290 static void AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map); | 2290 static void AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map); |
2291 | 2291 |
2292 // Migrates the given object to a map whose field representations are the | 2292 // Migrates the given object to a map whose field representations are the |
2293 // lowest upper bound of all known representations for that field. | 2293 // lowest upper bound of all known representations for that field. |
2294 static void MigrateInstance(Handle<JSObject> instance); | 2294 static void MigrateInstance(Handle<JSObject> instance); |
2295 | 2295 |
2296 // Migrates the given object only if the target map is already available, | 2296 // Migrates the given object only if the target map is already available, |
2297 // or returns an empty handle if such a map is not yet available. | 2297 // or returns false if such a map is not yet available. |
2298 static Handle<Object> TryMigrateInstance(Handle<JSObject> instance); | 2298 static bool TryMigrateInstance(Handle<JSObject> instance); |
2299 | 2299 |
2300 // Retrieve a value in a normalized object given a lookup result. | 2300 // Retrieve a value in a normalized object given a lookup result. |
2301 // Handles the special representation of JS global objects. | 2301 // Handles the special representation of JS global objects. |
2302 Object* GetNormalizedProperty(const LookupResult* result); | 2302 Object* GetNormalizedProperty(const LookupResult* result); |
2303 static Handle<Object> GetNormalizedProperty(Handle<JSObject> object, | 2303 static Handle<Object> GetNormalizedProperty(Handle<JSObject> object, |
2304 const LookupResult* result); | 2304 const LookupResult* result); |
2305 | 2305 |
2306 // Sets the property value in a normalized object given a lookup result. | 2306 // Sets the property value in a normalized object given a lookup result. |
2307 // Handles the special representation of JS global objects. | 2307 // Handles the special representation of JS global objects. |
2308 static void SetNormalizedProperty(Handle<JSObject> object, | 2308 static void SetNormalizedProperty(Handle<JSObject> object, |
(...skipping 4128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6437 inline void set_migration_target(bool value); | 6437 inline void set_migration_target(bool value); |
6438 inline bool is_migration_target(); | 6438 inline bool is_migration_target(); |
6439 inline void deprecate(); | 6439 inline void deprecate(); |
6440 inline bool is_deprecated(); | 6440 inline bool is_deprecated(); |
6441 inline bool CanBeDeprecated(); | 6441 inline bool CanBeDeprecated(); |
6442 // Returns a non-deprecated version of the input. If the input was not | 6442 // Returns a non-deprecated version of the input. If the input was not |
6443 // deprecated, it is directly returned. Otherwise, the non-deprecated version | 6443 // deprecated, it is directly returned. Otherwise, the non-deprecated version |
6444 // is found by re-transitioning from the root of the transition tree using the | 6444 // is found by re-transitioning from the root of the transition tree using the |
6445 // descriptor array of the map. Returns NULL if no updated map is found. | 6445 // descriptor array of the map. Returns NULL if no updated map is found. |
6446 // This method also applies any pending migrations along the prototype chain. | 6446 // This method also applies any pending migrations along the prototype chain. |
6447 static Handle<Map> CurrentMapForDeprecated(Handle<Map> map); | 6447 static MaybeHandle<Map> CurrentMapForDeprecated(Handle<Map> map) |
| 6448 V8_WARN_UNUSED_RESULT; |
6448 // Same as above, but does not touch the prototype chain. | 6449 // Same as above, but does not touch the prototype chain. |
6449 static Handle<Map> CurrentMapForDeprecatedInternal(Handle<Map> map); | 6450 static MaybeHandle<Map> CurrentMapForDeprecatedInternal(Handle<Map> map) |
| 6451 V8_WARN_UNUSED_RESULT; |
6450 | 6452 |
6451 static Handle<Map> CopyDropDescriptors(Handle<Map> map); | 6453 static Handle<Map> CopyDropDescriptors(Handle<Map> map); |
6452 static Handle<Map> CopyInsertDescriptor(Handle<Map> map, | 6454 static Handle<Map> CopyInsertDescriptor(Handle<Map> map, |
6453 Descriptor* descriptor, | 6455 Descriptor* descriptor, |
6454 TransitionFlag flag); | 6456 TransitionFlag flag); |
6455 static Handle<Map> CopyReplaceDescriptor(Handle<Map> map, | 6457 static Handle<Map> CopyReplaceDescriptor(Handle<Map> map, |
6456 Handle<DescriptorArray> descriptors, | 6458 Handle<DescriptorArray> descriptors, |
6457 Descriptor* descriptor, | 6459 Descriptor* descriptor, |
6458 int index, | 6460 int index, |
6459 TransitionFlag flag); | 6461 TransitionFlag flag); |
(...skipping 4807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11267 } else { | 11269 } else { |
11268 value &= ~(1 << bit_position); | 11270 value &= ~(1 << bit_position); |
11269 } | 11271 } |
11270 return value; | 11272 return value; |
11271 } | 11273 } |
11272 }; | 11274 }; |
11273 | 11275 |
11274 } } // namespace v8::internal | 11276 } } // namespace v8::internal |
11275 | 11277 |
11276 #endif // V8_OBJECTS_H_ | 11278 #endif // V8_OBJECTS_H_ |
OLD | NEW |