| 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 7049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7060 Handle<Object> receiver, | 7060 Handle<Object> receiver, |
| 7061 LanguageMode language_mode) { | 7061 LanguageMode language_mode) { |
| 7062 LookupIterator it = LookupIterator::PropertyOrElement( | 7062 LookupIterator it = LookupIterator::PropertyOrElement( |
| 7063 name->GetIsolate(), receiver, name, holder); | 7063 name->GetIsolate(), receiver, name, holder); |
| 7064 return GetProperty(&it, language_mode); | 7064 return GetProperty(&it, language_mode); |
| 7065 } | 7065 } |
| 7066 | 7066 |
| 7067 | 7067 |
| 7068 void JSReceiver::initialize_properties() { | 7068 void JSReceiver::initialize_properties() { |
| 7069 DCHECK(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); | 7069 DCHECK(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); |
| 7070 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); | 7070 DCHECK(!GetHeap()->InNewSpace(GetHeap()->empty_properties_dictionary())); |
| 7071 if (map()->is_dictionary_map()) { |
| 7072 WRITE_FIELD(this, kPropertiesOffset, |
| 7073 GetHeap()->empty_properties_dictionary()); |
| 7074 } else { |
| 7075 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); |
| 7076 } |
| 7071 } | 7077 } |
| 7072 | 7078 |
| 7073 | 7079 |
| 7074 bool JSReceiver::HasFastProperties() { | 7080 bool JSReceiver::HasFastProperties() { |
| 7075 DCHECK(properties()->IsDictionary() == map()->is_dictionary_map()); | 7081 DCHECK(properties()->IsDictionary() == map()->is_dictionary_map()); |
| 7076 return !properties()->IsDictionary(); | 7082 return !properties()->IsDictionary(); |
| 7077 } | 7083 } |
| 7078 | 7084 |
| 7079 | 7085 |
| 7080 NameDictionary* JSReceiver::property_dictionary() { | 7086 NameDictionary* JSReceiver::property_dictionary() { |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7804 #undef WRITE_INT64_FIELD | 7810 #undef WRITE_INT64_FIELD |
| 7805 #undef READ_BYTE_FIELD | 7811 #undef READ_BYTE_FIELD |
| 7806 #undef WRITE_BYTE_FIELD | 7812 #undef WRITE_BYTE_FIELD |
| 7807 #undef NOBARRIER_READ_BYTE_FIELD | 7813 #undef NOBARRIER_READ_BYTE_FIELD |
| 7808 #undef NOBARRIER_WRITE_BYTE_FIELD | 7814 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7809 | 7815 |
| 7810 } // namespace internal | 7816 } // namespace internal |
| 7811 } // namespace v8 | 7817 } // namespace v8 |
| 7812 | 7818 |
| 7813 #endif // V8_OBJECTS_INL_H_ | 7819 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |