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 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1927 ASSERT(descriptor_number < number_of_descriptors()); | 1927 ASSERT(descriptor_number < number_of_descriptors()); |
1928 return String::cast(get(ToKeyIndex(descriptor_number))); | 1928 return String::cast(get(ToKeyIndex(descriptor_number))); |
1929 } | 1929 } |
1930 | 1930 |
1931 | 1931 |
1932 Object* DescriptorArray::GetValue(int descriptor_number) { | 1932 Object* DescriptorArray::GetValue(int descriptor_number) { |
1933 ASSERT(descriptor_number < number_of_descriptors()); | 1933 ASSERT(descriptor_number < number_of_descriptors()); |
1934 return GetContentArray()->get(ToValueIndex(descriptor_number)); | 1934 return GetContentArray()->get(ToValueIndex(descriptor_number)); |
1935 } | 1935 } |
1936 | 1936 |
1937 | |
1938 PropertyDetails DescriptorArray::GetDetails(int descriptor_number) { | 1937 PropertyDetails DescriptorArray::GetDetails(int descriptor_number) { |
1939 ASSERT(descriptor_number < number_of_descriptors()); | 1938 ASSERT(descriptor_number < number_of_descriptors()); |
1940 Object* details = GetContentArray()->get(ToDetailsIndex(descriptor_number)); | 1939 Object* details = GetContentArray()->get(ToDetailsIndex(descriptor_number)); |
1941 return PropertyDetails(Smi::cast(details)); | 1940 return PropertyDetails(Smi::cast(details)); |
1942 } | 1941 } |
1943 | 1942 |
1943 FixedArray* DescriptorArray::RawGetContentArray() { | |
1944 Object* array = this->get(DescriptorArray::kContentArrayIndex); | |
1945 return static_cast<FixedArray*>(array); | |
1946 } | |
1947 | |
Michael Starzinger
2012/05/24 14:02:25
Two empty lines between top-level methods.
Toon Verwaest
2012/05/25 11:36:46
Done.
| |
1948 Object* DescriptorArray::RawGetValue(int descriptor_number) { | |
1949 ASSERT(descriptor_number < number_of_descriptors()); | |
1950 return RawGetContentArray()->get(ToValueIndex(descriptor_number)); | |
1951 } | |
1952 | |
1953 PropertyDetails DescriptorArray::RawGetDetails(int descriptor_number) { | |
1954 ASSERT(descriptor_number < number_of_descriptors()); | |
1955 Object* details = RawGetContentArray()->get(ToDetailsIndex(descriptor_number)) ; | |
Michael Starzinger
2012/05/24 14:02:25
More than 80 characters.
Toon Verwaest
2012/05/25 11:36:46
Done.
| |
1956 return PropertyDetails(Smi::cast(details)); | |
1957 } | |
1958 | |
1944 | 1959 |
1945 PropertyType DescriptorArray::GetType(int descriptor_number) { | 1960 PropertyType DescriptorArray::GetType(int descriptor_number) { |
1946 return GetDetails(descriptor_number).type(); | 1961 return GetDetails(descriptor_number).type(); |
1947 } | 1962 } |
1948 | 1963 |
1949 | 1964 |
1950 int DescriptorArray::GetFieldIndex(int descriptor_number) { | 1965 int DescriptorArray::GetFieldIndex(int descriptor_number) { |
1951 return Descriptor::IndexFromValue(GetValue(descriptor_number)); | 1966 return Descriptor::IndexFromValue(GetValue(descriptor_number)); |
1952 } | 1967 } |
1953 | 1968 |
(...skipping 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5027 #undef WRITE_UINT32_FIELD | 5042 #undef WRITE_UINT32_FIELD |
5028 #undef READ_SHORT_FIELD | 5043 #undef READ_SHORT_FIELD |
5029 #undef WRITE_SHORT_FIELD | 5044 #undef WRITE_SHORT_FIELD |
5030 #undef READ_BYTE_FIELD | 5045 #undef READ_BYTE_FIELD |
5031 #undef WRITE_BYTE_FIELD | 5046 #undef WRITE_BYTE_FIELD |
5032 | 5047 |
5033 | 5048 |
5034 } } // namespace v8::internal | 5049 } } // namespace v8::internal |
5035 | 5050 |
5036 #endif // V8_OBJECTS_INL_H_ | 5051 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |