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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 HeapObject::cast(this)->map() == | 870 HeapObject::cast(this)->map() == |
871 HeapObject::cast(this)->GetHeap()->hash_table_map(); | 871 HeapObject::cast(this)->GetHeap()->hash_table_map(); |
872 } | 872 } |
873 | 873 |
874 | 874 |
875 bool Object::IsWeakHashTable() const { | 875 bool Object::IsWeakHashTable() const { |
876 return IsHashTable(); | 876 return IsHashTable(); |
877 } | 877 } |
878 | 878 |
879 | 879 |
880 bool Object::IsWeakValueHashTable() const { return IsHashTable(); } | |
881 | |
882 | |
883 bool Object::IsDictionary() const { | 880 bool Object::IsDictionary() const { |
884 return IsHashTable() && | 881 return IsHashTable() && |
885 this != HeapObject::cast(this)->GetHeap()->string_table(); | 882 this != HeapObject::cast(this)->GetHeap()->string_table(); |
886 } | 883 } |
887 | 884 |
888 | 885 |
889 bool Object::IsNameDictionary() const { | 886 bool Object::IsNameDictionary() const { |
890 return IsDictionary(); | 887 return IsDictionary(); |
891 } | 888 } |
892 | 889 |
(...skipping 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3312 CAST_ACCESSOR(SlicedString) | 3309 CAST_ACCESSOR(SlicedString) |
3313 CAST_ACCESSOR(Smi) | 3310 CAST_ACCESSOR(Smi) |
3314 CAST_ACCESSOR(String) | 3311 CAST_ACCESSOR(String) |
3315 CAST_ACCESSOR(StringTable) | 3312 CAST_ACCESSOR(StringTable) |
3316 CAST_ACCESSOR(Struct) | 3313 CAST_ACCESSOR(Struct) |
3317 CAST_ACCESSOR(Symbol) | 3314 CAST_ACCESSOR(Symbol) |
3318 CAST_ACCESSOR(UnseededNumberDictionary) | 3315 CAST_ACCESSOR(UnseededNumberDictionary) |
3319 CAST_ACCESSOR(WeakCell) | 3316 CAST_ACCESSOR(WeakCell) |
3320 CAST_ACCESSOR(WeakFixedArray) | 3317 CAST_ACCESSOR(WeakFixedArray) |
3321 CAST_ACCESSOR(WeakHashTable) | 3318 CAST_ACCESSOR(WeakHashTable) |
3322 CAST_ACCESSOR(WeakValueHashTable) | |
3323 | 3319 |
3324 | 3320 |
3325 // static | 3321 // static |
3326 template <class Traits> | 3322 template <class Traits> |
3327 STATIC_CONST_MEMBER_DEFINITION const InstanceType | 3323 STATIC_CONST_MEMBER_DEFINITION const InstanceType |
3328 FixedTypedArray<Traits>::kInstanceType; | 3324 FixedTypedArray<Traits>::kInstanceType; |
3329 | 3325 |
3330 | 3326 |
3331 template <class Traits> | 3327 template <class Traits> |
3332 FixedTypedArray<Traits>* FixedTypedArray<Traits>::cast(Object* object) { | 3328 FixedTypedArray<Traits>* FixedTypedArray<Traits>::cast(Object* object) { |
(...skipping 4498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7831 #undef READ_INT64_FIELD | 7827 #undef READ_INT64_FIELD |
7832 #undef WRITE_INT64_FIELD | 7828 #undef WRITE_INT64_FIELD |
7833 #undef READ_BYTE_FIELD | 7829 #undef READ_BYTE_FIELD |
7834 #undef WRITE_BYTE_FIELD | 7830 #undef WRITE_BYTE_FIELD |
7835 #undef NOBARRIER_READ_BYTE_FIELD | 7831 #undef NOBARRIER_READ_BYTE_FIELD |
7836 #undef NOBARRIER_WRITE_BYTE_FIELD | 7832 #undef NOBARRIER_WRITE_BYTE_FIELD |
7837 | 7833 |
7838 } } // namespace v8::internal | 7834 } } // namespace v8::internal |
7839 | 7835 |
7840 #endif // V8_OBJECTS_INL_H_ | 7836 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |