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 4411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4422 | 4422 |
4423 | 4423 |
4424 int Map::GetInObjectPropertyOffset(int index) { | 4424 int Map::GetInObjectPropertyOffset(int index) { |
4425 // Adjust for the number of properties stored in the object. | 4425 // Adjust for the number of properties stored in the object. |
4426 index -= GetInObjectProperties(); | 4426 index -= GetInObjectProperties(); |
4427 DCHECK(index <= 0); | 4427 DCHECK(index <= 0); |
4428 return instance_size() + (index * kPointerSize); | 4428 return instance_size() + (index * kPointerSize); |
4429 } | 4429 } |
4430 | 4430 |
4431 | 4431 |
4432 Handle<Map> Map::CopyInstallDescriptorsForTesting( | 4432 Handle<Map> Map::AddMissingTransitionsForTesting( |
4433 Handle<Map> map, int new_descriptor, Handle<DescriptorArray> descriptors, | 4433 Handle<Map> split_map, Handle<DescriptorArray> descriptors, |
4434 Handle<LayoutDescriptor> layout_descriptor) { | 4434 Handle<LayoutDescriptor> full_layout_descriptor) { |
4435 return CopyInstallDescriptors(map, new_descriptor, descriptors, | 4435 return AddMissingTransitions(split_map, descriptors, full_layout_descriptor); |
4436 layout_descriptor); | |
4437 } | 4436 } |
4438 | 4437 |
4439 | 4438 |
4440 int HeapObject::SizeFromMap(Map* map) { | 4439 int HeapObject::SizeFromMap(Map* map) { |
4441 int instance_size = map->instance_size(); | 4440 int instance_size = map->instance_size(); |
4442 if (instance_size != kVariableSizeSentinel) return instance_size; | 4441 if (instance_size != kVariableSizeSentinel) return instance_size; |
4443 // Only inline the most frequent cases. | 4442 // Only inline the most frequent cases. |
4444 InstanceType instance_type = map->instance_type(); | 4443 InstanceType instance_type = map->instance_type(); |
4445 if (instance_type == FIXED_ARRAY_TYPE || | 4444 if (instance_type == FIXED_ARRAY_TYPE || |
4446 instance_type == TRANSITION_ARRAY_TYPE) { | 4445 instance_type == TRANSITION_ARRAY_TYPE) { |
(...skipping 3421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7868 #undef WRITE_INT64_FIELD | 7867 #undef WRITE_INT64_FIELD |
7869 #undef READ_BYTE_FIELD | 7868 #undef READ_BYTE_FIELD |
7870 #undef WRITE_BYTE_FIELD | 7869 #undef WRITE_BYTE_FIELD |
7871 #undef NOBARRIER_READ_BYTE_FIELD | 7870 #undef NOBARRIER_READ_BYTE_FIELD |
7872 #undef NOBARRIER_WRITE_BYTE_FIELD | 7871 #undef NOBARRIER_WRITE_BYTE_FIELD |
7873 | 7872 |
7874 } // namespace internal | 7873 } // namespace internal |
7875 } // namespace v8 | 7874 } // namespace v8 |
7876 | 7875 |
7877 #endif // V8_OBJECTS_INL_H_ | 7876 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |