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 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2890 return GetHeap()->empty_fixed_array(); | 2890 return GetHeap()->empty_fixed_array(); |
2891 } else if (has_external_array_elements()) { | 2891 } else if (has_external_array_elements()) { |
2892 ExternalArray* empty_array = GetHeap()->EmptyExternalArrayForMap(this); | 2892 ExternalArray* empty_array = GetHeap()->EmptyExternalArrayForMap(this); |
2893 DCHECK(!GetHeap()->InNewSpace(empty_array)); | 2893 DCHECK(!GetHeap()->InNewSpace(empty_array)); |
2894 return empty_array; | 2894 return empty_array; |
2895 } else if (has_fixed_typed_array_elements()) { | 2895 } else if (has_fixed_typed_array_elements()) { |
2896 FixedTypedArrayBase* empty_array = | 2896 FixedTypedArrayBase* empty_array = |
2897 GetHeap()->EmptyFixedTypedArrayForMap(this); | 2897 GetHeap()->EmptyFixedTypedArrayForMap(this); |
2898 DCHECK(!GetHeap()->InNewSpace(empty_array)); | 2898 DCHECK(!GetHeap()->InNewSpace(empty_array)); |
2899 return empty_array; | 2899 return empty_array; |
2900 } else if (has_dictionary_elements()) { | |
2901 DCHECK(!GetHeap()->InNewSpace(GetHeap()->empty_slow_element_dictionary())); | |
2902 return GetHeap()->empty_slow_element_dictionary(); | |
2903 } else { | 2900 } else { |
2904 UNREACHABLE(); | 2901 UNREACHABLE(); |
2905 } | 2902 } |
2906 return NULL; | 2903 return NULL; |
2907 } | 2904 } |
2908 | 2905 |
2909 | 2906 |
2910 Object** DescriptorArray::GetKeySlot(int descriptor_number) { | 2907 Object** DescriptorArray::GetKeySlot(int descriptor_number) { |
2911 DCHECK(descriptor_number < number_of_descriptors()); | 2908 DCHECK(descriptor_number < number_of_descriptors()); |
2912 return RawFieldOfElementAt(ToKeyIndex(descriptor_number)); | 2909 return RawFieldOfElementAt(ToKeyIndex(descriptor_number)); |
(...skipping 4337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7250 #undef READ_SHORT_FIELD | 7247 #undef READ_SHORT_FIELD |
7251 #undef WRITE_SHORT_FIELD | 7248 #undef WRITE_SHORT_FIELD |
7252 #undef READ_BYTE_FIELD | 7249 #undef READ_BYTE_FIELD |
7253 #undef WRITE_BYTE_FIELD | 7250 #undef WRITE_BYTE_FIELD |
7254 #undef NOBARRIER_READ_BYTE_FIELD | 7251 #undef NOBARRIER_READ_BYTE_FIELD |
7255 #undef NOBARRIER_WRITE_BYTE_FIELD | 7252 #undef NOBARRIER_WRITE_BYTE_FIELD |
7256 | 7253 |
7257 } } // namespace v8::internal | 7254 } } // namespace v8::internal |
7258 | 7255 |
7259 #endif // V8_OBJECTS_INL_H_ | 7256 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |