| 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 2902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2913 return GetHeap()->empty_fixed_array(); | 2913 return GetHeap()->empty_fixed_array(); |
| 2914 } else if (has_external_array_elements()) { | 2914 } else if (has_external_array_elements()) { |
| 2915 ExternalArray* empty_array = GetHeap()->EmptyExternalArrayForMap(this); | 2915 ExternalArray* empty_array = GetHeap()->EmptyExternalArrayForMap(this); |
| 2916 DCHECK(!GetHeap()->InNewSpace(empty_array)); | 2916 DCHECK(!GetHeap()->InNewSpace(empty_array)); |
| 2917 return empty_array; | 2917 return empty_array; |
| 2918 } else if (has_fixed_typed_array_elements()) { | 2918 } else if (has_fixed_typed_array_elements()) { |
| 2919 FixedTypedArrayBase* empty_array = | 2919 FixedTypedArrayBase* empty_array = |
| 2920 GetHeap()->EmptyFixedTypedArrayForMap(this); | 2920 GetHeap()->EmptyFixedTypedArrayForMap(this); |
| 2921 DCHECK(!GetHeap()->InNewSpace(empty_array)); | 2921 DCHECK(!GetHeap()->InNewSpace(empty_array)); |
| 2922 return empty_array; | 2922 return empty_array; |
| 2923 } else if (has_dictionary_elements()) { | |
| 2924 DCHECK(!GetHeap()->InNewSpace(GetHeap()->empty_slow_element_dictionary())); | |
| 2925 return GetHeap()->empty_slow_element_dictionary(); | |
| 2926 } else { | 2923 } else { |
| 2927 UNREACHABLE(); | 2924 UNREACHABLE(); |
| 2928 } | 2925 } |
| 2929 return NULL; | 2926 return NULL; |
| 2930 } | 2927 } |
| 2931 | 2928 |
| 2932 | 2929 |
| 2933 Object** DescriptorArray::GetKeySlot(int descriptor_number) { | 2930 Object** DescriptorArray::GetKeySlot(int descriptor_number) { |
| 2934 DCHECK(descriptor_number < number_of_descriptors()); | 2931 DCHECK(descriptor_number < number_of_descriptors()); |
| 2935 return RawFieldOfElementAt(ToKeyIndex(descriptor_number)); | 2932 return RawFieldOfElementAt(ToKeyIndex(descriptor_number)); |
| (...skipping 4342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7278 #undef READ_SHORT_FIELD | 7275 #undef READ_SHORT_FIELD |
| 7279 #undef WRITE_SHORT_FIELD | 7276 #undef WRITE_SHORT_FIELD |
| 7280 #undef READ_BYTE_FIELD | 7277 #undef READ_BYTE_FIELD |
| 7281 #undef WRITE_BYTE_FIELD | 7278 #undef WRITE_BYTE_FIELD |
| 7282 #undef NOBARRIER_READ_BYTE_FIELD | 7279 #undef NOBARRIER_READ_BYTE_FIELD |
| 7283 #undef NOBARRIER_WRITE_BYTE_FIELD | 7280 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7284 | 7281 |
| 7285 } } // namespace v8::internal | 7282 } } // namespace v8::internal |
| 7286 | 7283 |
| 7287 #endif // V8_OBJECTS_INL_H_ | 7284 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |