| 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 3117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3128 set(ToValueIndex(descriptor_index), value); | 3128 set(ToValueIndex(descriptor_index), value); |
| 3129 } | 3129 } |
| 3130 | 3130 |
| 3131 | 3131 |
| 3132 PropertyDetails DescriptorArray::GetDetails(int descriptor_number) { | 3132 PropertyDetails DescriptorArray::GetDetails(int descriptor_number) { |
| 3133 DCHECK(descriptor_number < number_of_descriptors()); | 3133 DCHECK(descriptor_number < number_of_descriptors()); |
| 3134 Object* details = get(ToDetailsIndex(descriptor_number)); | 3134 Object* details = get(ToDetailsIndex(descriptor_number)); |
| 3135 return PropertyDetails(Smi::cast(details)); | 3135 return PropertyDetails(Smi::cast(details)); |
| 3136 } | 3136 } |
| 3137 | 3137 |
| 3138 | |
| 3139 int DescriptorArray::GetFieldIndex(int descriptor_number) { | 3138 int DescriptorArray::GetFieldIndex(int descriptor_number) { |
| 3140 DCHECK(GetDetails(descriptor_number).location() == kField); | 3139 DCHECK(GetDetails(descriptor_number).location() == kField); |
| 3141 return GetDetails(descriptor_number).field_index(); | 3140 return GetDetails(descriptor_number).field_index(); |
| 3142 } | 3141 } |
| 3143 | 3142 |
| 3144 FieldType* DescriptorArray::GetFieldType(int descriptor_number) { | 3143 FieldType* DescriptorArray::GetFieldType(int descriptor_number) { |
| 3145 DCHECK(GetDetails(descriptor_number).location() == kField); | 3144 DCHECK(GetDetails(descriptor_number).location() == kField); |
| 3146 Object* wrapped_type = GetValue(descriptor_number); | 3145 Object* wrapped_type = GetValue(descriptor_number); |
| 3147 return Map::UnwrapFieldType(wrapped_type); | 3146 return Map::UnwrapFieldType(wrapped_type); |
| 3148 } | 3147 } |
| (...skipping 5297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8446 #undef WRITE_INT64_FIELD | 8445 #undef WRITE_INT64_FIELD |
| 8447 #undef READ_BYTE_FIELD | 8446 #undef READ_BYTE_FIELD |
| 8448 #undef WRITE_BYTE_FIELD | 8447 #undef WRITE_BYTE_FIELD |
| 8449 #undef NOBARRIER_READ_BYTE_FIELD | 8448 #undef NOBARRIER_READ_BYTE_FIELD |
| 8450 #undef NOBARRIER_WRITE_BYTE_FIELD | 8449 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8451 | 8450 |
| 8452 } // namespace internal | 8451 } // namespace internal |
| 8453 } // namespace v8 | 8452 } // namespace v8 |
| 8454 | 8453 |
| 8455 #endif // V8_OBJECTS_INL_H_ | 8454 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |