OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 | 2135 |
2136 | 2136 |
2137 Object** DescriptorArray::GetKeySlot(int descriptor_number) { | 2137 Object** DescriptorArray::GetKeySlot(int descriptor_number) { |
2138 ASSERT(descriptor_number < number_of_descriptors()); | 2138 ASSERT(descriptor_number < number_of_descriptors()); |
2139 return HeapObject::RawField( | 2139 return HeapObject::RawField( |
2140 reinterpret_cast<HeapObject*>(this), | 2140 reinterpret_cast<HeapObject*>(this), |
2141 OffsetOfElementAt(ToKeyIndex(descriptor_number))); | 2141 OffsetOfElementAt(ToKeyIndex(descriptor_number))); |
2142 } | 2142 } |
2143 | 2143 |
2144 | 2144 |
| 2145 Object** DescriptorArray::GetDescriptorStartSlot(int descriptor_number) { |
| 2146 return GetKeySlot(descriptor_number); |
| 2147 } |
| 2148 |
| 2149 |
| 2150 Object** DescriptorArray::GetDescriptorEndSlot(int descriptor_number) { |
| 2151 return GetValueSlot(descriptor_number - 1) + 1; |
| 2152 } |
| 2153 |
| 2154 |
2145 String* DescriptorArray::GetKey(int descriptor_number) { | 2155 String* DescriptorArray::GetKey(int descriptor_number) { |
2146 ASSERT(descriptor_number < number_of_descriptors()); | 2156 ASSERT(descriptor_number < number_of_descriptors()); |
2147 return String::cast(get(ToKeyIndex(descriptor_number))); | 2157 return String::cast(get(ToKeyIndex(descriptor_number))); |
2148 } | 2158 } |
2149 | 2159 |
2150 | 2160 |
2151 int DescriptorArray::GetSortedKeyIndex(int descriptor_number) { | 2161 int DescriptorArray::GetSortedKeyIndex(int descriptor_number) { |
2152 return GetDetails(descriptor_number).pointer(); | 2162 return GetDetails(descriptor_number).pointer(); |
2153 } | 2163 } |
2154 | 2164 |
(...skipping 3725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5880 #undef WRITE_UINT32_FIELD | 5890 #undef WRITE_UINT32_FIELD |
5881 #undef READ_SHORT_FIELD | 5891 #undef READ_SHORT_FIELD |
5882 #undef WRITE_SHORT_FIELD | 5892 #undef WRITE_SHORT_FIELD |
5883 #undef READ_BYTE_FIELD | 5893 #undef READ_BYTE_FIELD |
5884 #undef WRITE_BYTE_FIELD | 5894 #undef WRITE_BYTE_FIELD |
5885 | 5895 |
5886 | 5896 |
5887 } } // namespace v8::internal | 5897 } } // namespace v8::internal |
5888 | 5898 |
5889 #endif // V8_OBJECTS_INL_H_ | 5899 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |