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 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3127 set(ToValueIndex(descriptor_index), value); | 3127 set(ToValueIndex(descriptor_index), value); |
3128 } | 3128 } |
3129 | 3129 |
3130 | 3130 |
3131 PropertyDetails DescriptorArray::GetDetails(int descriptor_number) { | 3131 PropertyDetails DescriptorArray::GetDetails(int descriptor_number) { |
3132 DCHECK(descriptor_number < number_of_descriptors()); | 3132 DCHECK(descriptor_number < number_of_descriptors()); |
3133 Object* details = get(ToDetailsIndex(descriptor_number)); | 3133 Object* details = get(ToDetailsIndex(descriptor_number)); |
3134 return PropertyDetails(Smi::cast(details)); | 3134 return PropertyDetails(Smi::cast(details)); |
3135 } | 3135 } |
3136 | 3136 |
3137 | |
3138 int DescriptorArray::GetFieldIndex(int descriptor_number) { | 3137 int DescriptorArray::GetFieldIndex(int descriptor_number) { |
3139 DCHECK(GetDetails(descriptor_number).location() == kField); | 3138 DCHECK(GetDetails(descriptor_number).location() == kField); |
3140 return GetDetails(descriptor_number).field_index(); | 3139 return GetDetails(descriptor_number).field_index(); |
3141 } | 3140 } |
3142 | 3141 |
3143 FieldType* DescriptorArray::GetFieldType(int descriptor_number) { | 3142 FieldType* DescriptorArray::GetFieldType(int descriptor_number) { |
3144 DCHECK(GetDetails(descriptor_number).location() == kField); | 3143 DCHECK(GetDetails(descriptor_number).location() == kField); |
3145 Object* wrapped_type = GetValue(descriptor_number); | 3144 Object* wrapped_type = GetValue(descriptor_number); |
3146 return Map::UnwrapFieldType(wrapped_type); | 3145 return Map::UnwrapFieldType(wrapped_type); |
3147 } | 3146 } |
(...skipping 5247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8395 #undef WRITE_INT64_FIELD | 8394 #undef WRITE_INT64_FIELD |
8396 #undef READ_BYTE_FIELD | 8395 #undef READ_BYTE_FIELD |
8397 #undef WRITE_BYTE_FIELD | 8396 #undef WRITE_BYTE_FIELD |
8398 #undef NOBARRIER_READ_BYTE_FIELD | 8397 #undef NOBARRIER_READ_BYTE_FIELD |
8399 #undef NOBARRIER_WRITE_BYTE_FIELD | 8398 #undef NOBARRIER_WRITE_BYTE_FIELD |
8400 | 8399 |
8401 } // namespace internal | 8400 } // namespace internal |
8402 } // namespace v8 | 8401 } // namespace v8 |
8403 | 8402 |
8404 #endif // V8_OBJECTS_INL_H_ | 8403 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |