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 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2975 details.CopyWithRepresentation(representation).AsSmi()); | 2975 details.CopyWithRepresentation(representation).AsSmi()); |
2976 } | 2976 } |
2977 | 2977 |
2978 | 2978 |
2979 Object** DescriptorArray::GetValueSlot(int descriptor_number) { | 2979 Object** DescriptorArray::GetValueSlot(int descriptor_number) { |
2980 DCHECK(descriptor_number < number_of_descriptors()); | 2980 DCHECK(descriptor_number < number_of_descriptors()); |
2981 return RawFieldOfElementAt(ToValueIndex(descriptor_number)); | 2981 return RawFieldOfElementAt(ToValueIndex(descriptor_number)); |
2982 } | 2982 } |
2983 | 2983 |
2984 | 2984 |
| 2985 int DescriptorArray::GetValueOffset(int descriptor_number) { |
| 2986 return OffsetOfElementAt(ToValueIndex(descriptor_number)); |
| 2987 } |
| 2988 |
| 2989 |
2985 Object* DescriptorArray::GetValue(int descriptor_number) { | 2990 Object* DescriptorArray::GetValue(int descriptor_number) { |
2986 DCHECK(descriptor_number < number_of_descriptors()); | 2991 DCHECK(descriptor_number < number_of_descriptors()); |
2987 return get(ToValueIndex(descriptor_number)); | 2992 return get(ToValueIndex(descriptor_number)); |
2988 } | 2993 } |
2989 | 2994 |
2990 | 2995 |
2991 void DescriptorArray::SetValue(int descriptor_index, Object* value) { | 2996 void DescriptorArray::SetValue(int descriptor_index, Object* value) { |
2992 set(ToValueIndex(descriptor_index), value); | 2997 set(ToValueIndex(descriptor_index), value); |
2993 } | 2998 } |
2994 | 2999 |
(...skipping 4274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7269 #undef READ_SHORT_FIELD | 7274 #undef READ_SHORT_FIELD |
7270 #undef WRITE_SHORT_FIELD | 7275 #undef WRITE_SHORT_FIELD |
7271 #undef READ_BYTE_FIELD | 7276 #undef READ_BYTE_FIELD |
7272 #undef WRITE_BYTE_FIELD | 7277 #undef WRITE_BYTE_FIELD |
7273 #undef NOBARRIER_READ_BYTE_FIELD | 7278 #undef NOBARRIER_READ_BYTE_FIELD |
7274 #undef NOBARRIER_WRITE_BYTE_FIELD | 7279 #undef NOBARRIER_WRITE_BYTE_FIELD |
7275 | 7280 |
7276 } } // namespace v8::internal | 7281 } } // namespace v8::internal |
7277 | 7282 |
7278 #endif // V8_OBJECTS_INL_H_ | 7283 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |