| 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 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 5468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5479 ACCESSORS(AccessorInfo, expected_receiver_type, Object, | 5479 ACCESSORS(AccessorInfo, expected_receiver_type, Object, |
| 5480 kExpectedReceiverTypeOffset) | 5480 kExpectedReceiverTypeOffset) |
| 5481 | 5481 |
| 5482 ACCESSORS(AccessorInfo, getter, Object, kGetterOffset) | 5482 ACCESSORS(AccessorInfo, getter, Object, kGetterOffset) |
| 5483 ACCESSORS(AccessorInfo, setter, Object, kSetterOffset) | 5483 ACCESSORS(AccessorInfo, setter, Object, kSetterOffset) |
| 5484 ACCESSORS(AccessorInfo, js_getter, Object, kJsGetterOffset) | 5484 ACCESSORS(AccessorInfo, js_getter, Object, kJsGetterOffset) |
| 5485 ACCESSORS(AccessorInfo, data, Object, kDataOffset) | 5485 ACCESSORS(AccessorInfo, data, Object, kDataOffset) |
| 5486 | 5486 |
| 5487 ACCESSORS(Box, value, Object, kValueOffset) | 5487 ACCESSORS(Box, value, Object, kValueOffset) |
| 5488 | 5488 |
| 5489 Map* PrototypeInfo::ObjectCreateMap() { |
| 5490 return Map::cast(WeakCell::cast(object_create_map())->value()); |
| 5491 } |
| 5492 |
| 5493 // static |
| 5494 void PrototypeInfo::SetObjectCreateMap(Handle<PrototypeInfo> info, |
| 5495 Handle<Map> map) { |
| 5496 Handle<WeakCell> cell = Map::WeakCellForMap(map); |
| 5497 info->set_object_create_map(*cell); |
| 5498 } |
| 5499 |
| 5500 bool PrototypeInfo::HasObjectCreateMap() { |
| 5501 Object* cache = object_create_map(); |
| 5502 return cache->IsWeakCell() && !WeakCell::cast(cache)->cleared(); |
| 5503 } |
| 5504 |
| 5489 ACCESSORS(PrototypeInfo, prototype_users, Object, kPrototypeUsersOffset) | 5505 ACCESSORS(PrototypeInfo, prototype_users, Object, kPrototypeUsersOffset) |
| 5506 ACCESSORS(PrototypeInfo, object_create_map, Object, kObjectCreateMap) |
| 5490 SMI_ACCESSORS(PrototypeInfo, registry_slot, kRegistrySlotOffset) | 5507 SMI_ACCESSORS(PrototypeInfo, registry_slot, kRegistrySlotOffset) |
| 5491 ACCESSORS(PrototypeInfo, validity_cell, Object, kValidityCellOffset) | 5508 ACCESSORS(PrototypeInfo, validity_cell, Object, kValidityCellOffset) |
| 5492 SMI_ACCESSORS(PrototypeInfo, bit_field, kBitFieldOffset) | 5509 SMI_ACCESSORS(PrototypeInfo, bit_field, kBitFieldOffset) |
| 5493 BOOL_ACCESSORS(PrototypeInfo, bit_field, should_be_fast_map, kShouldBeFastBit) | 5510 BOOL_ACCESSORS(PrototypeInfo, bit_field, should_be_fast_map, kShouldBeFastBit) |
| 5494 | 5511 |
| 5495 ACCESSORS(SloppyBlockWithEvalContextExtension, scope_info, ScopeInfo, | 5512 ACCESSORS(SloppyBlockWithEvalContextExtension, scope_info, ScopeInfo, |
| 5496 kScopeInfoOffset) | 5513 kScopeInfoOffset) |
| 5497 ACCESSORS(SloppyBlockWithEvalContextExtension, extension, JSObject, | 5514 ACCESSORS(SloppyBlockWithEvalContextExtension, extension, JSObject, |
| 5498 kExtensionOffset) | 5515 kExtensionOffset) |
| 5499 | 5516 |
| (...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7930 #undef WRITE_INT64_FIELD | 7947 #undef WRITE_INT64_FIELD |
| 7931 #undef READ_BYTE_FIELD | 7948 #undef READ_BYTE_FIELD |
| 7932 #undef WRITE_BYTE_FIELD | 7949 #undef WRITE_BYTE_FIELD |
| 7933 #undef NOBARRIER_READ_BYTE_FIELD | 7950 #undef NOBARRIER_READ_BYTE_FIELD |
| 7934 #undef NOBARRIER_WRITE_BYTE_FIELD | 7951 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7935 | 7952 |
| 7936 } // namespace internal | 7953 } // namespace internal |
| 7937 } // namespace v8 | 7954 } // namespace v8 |
| 7938 | 7955 |
| 7939 #endif // V8_OBJECTS_INL_H_ | 7956 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |