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 4662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4673 | 4673 |
4674 void Map::set_migration_target(bool value) { | 4674 void Map::set_migration_target(bool value) { |
4675 set_bit_field3(IsMigrationTarget::update(bit_field3(), value)); | 4675 set_bit_field3(IsMigrationTarget::update(bit_field3(), value)); |
4676 } | 4676 } |
4677 | 4677 |
4678 | 4678 |
4679 bool Map::is_migration_target() { | 4679 bool Map::is_migration_target() { |
4680 return IsMigrationTarget::decode(bit_field3()); | 4680 return IsMigrationTarget::decode(bit_field3()); |
4681 } | 4681 } |
4682 | 4682 |
| 4683 void Map::set_immutable_proto(bool value) { |
| 4684 set_bit_field3(ImmutablePrototype::update(bit_field3(), value)); |
| 4685 } |
| 4686 |
| 4687 bool Map::is_immutable_proto() { |
| 4688 return ImmutablePrototype::decode(bit_field3()); |
| 4689 } |
4683 | 4690 |
4684 void Map::set_new_target_is_base(bool value) { | 4691 void Map::set_new_target_is_base(bool value) { |
4685 set_bit_field3(NewTargetIsBase::update(bit_field3(), value)); | 4692 set_bit_field3(NewTargetIsBase::update(bit_field3(), value)); |
4686 } | 4693 } |
4687 | 4694 |
4688 | 4695 |
4689 bool Map::new_target_is_base() { return NewTargetIsBase::decode(bit_field3()); } | 4696 bool Map::new_target_is_base() { return NewTargetIsBase::decode(bit_field3()); } |
4690 | 4697 |
4691 | 4698 |
4692 void Map::set_construction_counter(int value) { | 4699 void Map::set_construction_counter(int value) { |
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5579 ACCESSORS(FunctionTemplateInfo, instance_call_handler, Object, | 5586 ACCESSORS(FunctionTemplateInfo, instance_call_handler, Object, |
5580 kInstanceCallHandlerOffset) | 5587 kInstanceCallHandlerOffset) |
5581 ACCESSORS(FunctionTemplateInfo, access_check_info, Object, | 5588 ACCESSORS(FunctionTemplateInfo, access_check_info, Object, |
5582 kAccessCheckInfoOffset) | 5589 kAccessCheckInfoOffset) |
5583 ACCESSORS(FunctionTemplateInfo, shared_function_info, Object, | 5590 ACCESSORS(FunctionTemplateInfo, shared_function_info, Object, |
5584 kSharedFunctionInfoOffset) | 5591 kSharedFunctionInfoOffset) |
5585 | 5592 |
5586 SMI_ACCESSORS(FunctionTemplateInfo, flag, kFlagOffset) | 5593 SMI_ACCESSORS(FunctionTemplateInfo, flag, kFlagOffset) |
5587 | 5594 |
5588 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset) | 5595 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset) |
5589 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object, | 5596 ACCESSORS(ObjectTemplateInfo, data, Object, kDataOffset) |
5590 kInternalFieldCountOffset) | 5597 int ObjectTemplateInfo::internal_field_count() const { |
| 5598 Object* value = data(); |
| 5599 DCHECK(value->IsSmi()); |
| 5600 return InternalFieldCount::decode(Smi::cast(value)->value()); |
| 5601 } |
| 5602 void ObjectTemplateInfo::set_internal_field_count(int count) { |
| 5603 return set_data(Smi::FromInt( |
| 5604 InternalFieldCount::update(Smi::cast(data())->value(), count))); |
| 5605 } |
| 5606 bool ObjectTemplateInfo::immutable_proto() const { |
| 5607 Object* value = data(); |
| 5608 DCHECK(value->IsSmi()); |
| 5609 return IsImmutablePrototype::decode(Smi::cast(value)->value()); |
| 5610 } |
| 5611 void ObjectTemplateInfo::set_immutable_proto(bool immutable) { |
| 5612 return set_data(Smi::FromInt( |
| 5613 IsImmutablePrototype::update(Smi::cast(data())->value(), immutable))); |
| 5614 } |
5591 | 5615 |
5592 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset) | 5616 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset) |
5593 ACCESSORS(AllocationSite, nested_site, Object, kNestedSiteOffset) | 5617 ACCESSORS(AllocationSite, nested_site, Object, kNestedSiteOffset) |
5594 SMI_ACCESSORS(AllocationSite, pretenure_data, kPretenureDataOffset) | 5618 SMI_ACCESSORS(AllocationSite, pretenure_data, kPretenureDataOffset) |
5595 SMI_ACCESSORS(AllocationSite, pretenure_create_count, | 5619 SMI_ACCESSORS(AllocationSite, pretenure_create_count, |
5596 kPretenureCreateCountOffset) | 5620 kPretenureCreateCountOffset) |
5597 ACCESSORS(AllocationSite, dependent_code, DependentCode, | 5621 ACCESSORS(AllocationSite, dependent_code, DependentCode, |
5598 kDependentCodeOffset) | 5622 kDependentCodeOffset) |
5599 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset) | 5623 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset) |
5600 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset) | 5624 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset) |
(...skipping 2398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7999 #undef WRITE_INT64_FIELD | 8023 #undef WRITE_INT64_FIELD |
8000 #undef READ_BYTE_FIELD | 8024 #undef READ_BYTE_FIELD |
8001 #undef WRITE_BYTE_FIELD | 8025 #undef WRITE_BYTE_FIELD |
8002 #undef NOBARRIER_READ_BYTE_FIELD | 8026 #undef NOBARRIER_READ_BYTE_FIELD |
8003 #undef NOBARRIER_WRITE_BYTE_FIELD | 8027 #undef NOBARRIER_WRITE_BYTE_FIELD |
8004 | 8028 |
8005 } // namespace internal | 8029 } // namespace internal |
8006 } // namespace v8 | 8030 } // namespace v8 |
8007 | 8031 |
8008 #endif // V8_OBJECTS_INL_H_ | 8032 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |