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 7557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7568 if (map()->is_dictionary_map()) { | 7568 if (map()->is_dictionary_map()) { |
7569 WRITE_FIELD(this, kPropertiesOffset, | 7569 WRITE_FIELD(this, kPropertiesOffset, |
7570 GetHeap()->empty_properties_dictionary()); | 7570 GetHeap()->empty_properties_dictionary()); |
7571 } else { | 7571 } else { |
7572 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); | 7572 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); |
7573 } | 7573 } |
7574 } | 7574 } |
7575 | 7575 |
7576 | 7576 |
7577 bool JSReceiver::HasFastProperties() { | 7577 bool JSReceiver::HasFastProperties() { |
7578 DCHECK(properties()->IsDictionary() == map()->is_dictionary_map()); | 7578 DCHECK_EQ(properties()->IsDictionary(), map()->is_dictionary_map()); |
7579 return !properties()->IsDictionary(); | 7579 return !properties()->IsDictionary(); |
7580 } | 7580 } |
7581 | 7581 |
7582 | 7582 |
7583 NameDictionary* JSReceiver::property_dictionary() { | 7583 NameDictionary* JSReceiver::property_dictionary() { |
7584 DCHECK(!HasFastProperties()); | 7584 DCHECK(!HasFastProperties()); |
7585 DCHECK(!IsJSGlobalObject()); | 7585 DCHECK(!IsJSGlobalObject()); |
7586 return NameDictionary::cast(properties()); | 7586 return NameDictionary::cast(properties()); |
7587 } | 7587 } |
7588 | 7588 |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8414 #undef WRITE_INT64_FIELD | 8414 #undef WRITE_INT64_FIELD |
8415 #undef READ_BYTE_FIELD | 8415 #undef READ_BYTE_FIELD |
8416 #undef WRITE_BYTE_FIELD | 8416 #undef WRITE_BYTE_FIELD |
8417 #undef NOBARRIER_READ_BYTE_FIELD | 8417 #undef NOBARRIER_READ_BYTE_FIELD |
8418 #undef NOBARRIER_WRITE_BYTE_FIELD | 8418 #undef NOBARRIER_WRITE_BYTE_FIELD |
8419 | 8419 |
8420 } // namespace internal | 8420 } // namespace internal |
8421 } // namespace v8 | 8421 } // namespace v8 |
8422 | 8422 |
8423 #endif // V8_OBJECTS_INL_H_ | 8423 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |