| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2982 HashTable<Shape, Key>* HashTable<Shape, Key>::cast(Object* obj) { | 2982 HashTable<Shape, Key>* HashTable<Shape, Key>::cast(Object* obj) { |
| 2983 ASSERT(obj->IsHashTable()); | 2983 ASSERT(obj->IsHashTable()); |
| 2984 return reinterpret_cast<HashTable*>(obj); | 2984 return reinterpret_cast<HashTable*>(obj); |
| 2985 } | 2985 } |
| 2986 | 2986 |
| 2987 | 2987 |
| 2988 SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) | 2988 SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) |
| 2989 SYNCHRONIZED_SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) | 2989 SYNCHRONIZED_SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) |
| 2990 | 2990 |
| 2991 SMI_ACCESSORS(FreeSpace, size, kSizeOffset) | 2991 SMI_ACCESSORS(FreeSpace, size, kSizeOffset) |
| 2992 SYNCHRONIZED_SMI_ACCESSORS(FreeSpace, size, kSizeOffset) |
| 2992 | 2993 |
| 2993 SMI_ACCESSORS(String, length, kLengthOffset) | 2994 SMI_ACCESSORS(String, length, kLengthOffset) |
| 2994 SYNCHRONIZED_SMI_ACCESSORS(String, length, kLengthOffset) | 2995 SYNCHRONIZED_SMI_ACCESSORS(String, length, kLengthOffset) |
| 2995 | 2996 |
| 2996 | 2997 |
| 2997 uint32_t Name::hash_field() { | 2998 uint32_t Name::hash_field() { |
| 2998 return READ_UINT32_FIELD(this, kHashFieldOffset); | 2999 return READ_UINT32_FIELD(this, kHashFieldOffset); |
| 2999 } | 3000 } |
| 3000 | 3001 |
| 3001 | 3002 |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4009 } | 4010 } |
| 4010 if (instance_type == ASCII_STRING_TYPE || | 4011 if (instance_type == ASCII_STRING_TYPE || |
| 4011 instance_type == ASCII_INTERNALIZED_STRING_TYPE) { | 4012 instance_type == ASCII_INTERNALIZED_STRING_TYPE) { |
| 4012 return SeqOneByteString::SizeFor( | 4013 return SeqOneByteString::SizeFor( |
| 4013 reinterpret_cast<SeqOneByteString*>(this)->length()); | 4014 reinterpret_cast<SeqOneByteString*>(this)->length()); |
| 4014 } | 4015 } |
| 4015 if (instance_type == BYTE_ARRAY_TYPE) { | 4016 if (instance_type == BYTE_ARRAY_TYPE) { |
| 4016 return reinterpret_cast<ByteArray*>(this)->ByteArraySize(); | 4017 return reinterpret_cast<ByteArray*>(this)->ByteArraySize(); |
| 4017 } | 4018 } |
| 4018 if (instance_type == FREE_SPACE_TYPE) { | 4019 if (instance_type == FREE_SPACE_TYPE) { |
| 4019 return reinterpret_cast<FreeSpace*>(this)->size(); | 4020 return reinterpret_cast<FreeSpace*>(this)->synchronized_size(); |
| 4020 } | 4021 } |
| 4021 if (instance_type == STRING_TYPE || | 4022 if (instance_type == STRING_TYPE || |
| 4022 instance_type == INTERNALIZED_STRING_TYPE) { | 4023 instance_type == INTERNALIZED_STRING_TYPE) { |
| 4023 return SeqTwoByteString::SizeFor( | 4024 return SeqTwoByteString::SizeFor( |
| 4024 reinterpret_cast<SeqTwoByteString*>(this)->length()); | 4025 reinterpret_cast<SeqTwoByteString*>(this)->length()); |
| 4025 } | 4026 } |
| 4026 if (instance_type == FIXED_DOUBLE_ARRAY_TYPE) { | 4027 if (instance_type == FIXED_DOUBLE_ARRAY_TYPE) { |
| 4027 return FixedDoubleArray::SizeFor( | 4028 return FixedDoubleArray::SizeFor( |
| 4028 reinterpret_cast<FixedDoubleArray*>(this)->length()); | 4029 reinterpret_cast<FixedDoubleArray*>(this)->length()); |
| 4029 } | 4030 } |
| (...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6924 #undef READ_UINT32_FIELD | 6925 #undef READ_UINT32_FIELD |
| 6925 #undef WRITE_UINT32_FIELD | 6926 #undef WRITE_UINT32_FIELD |
| 6926 #undef READ_SHORT_FIELD | 6927 #undef READ_SHORT_FIELD |
| 6927 #undef WRITE_SHORT_FIELD | 6928 #undef WRITE_SHORT_FIELD |
| 6928 #undef READ_BYTE_FIELD | 6929 #undef READ_BYTE_FIELD |
| 6929 #undef WRITE_BYTE_FIELD | 6930 #undef WRITE_BYTE_FIELD |
| 6930 | 6931 |
| 6931 } } // namespace v8::internal | 6932 } } // namespace v8::internal |
| 6932 | 6933 |
| 6933 #endif // V8_OBJECTS_INL_H_ | 6934 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |