OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2107 | 2107 |
2108 | 2108 |
2109 template <typename Shape, typename Key> | 2109 template <typename Shape, typename Key> |
2110 HashTable<Shape, Key>* HashTable<Shape, Key>::cast(Object* obj) { | 2110 HashTable<Shape, Key>* HashTable<Shape, Key>::cast(Object* obj) { |
2111 ASSERT(obj->IsHashTable()); | 2111 ASSERT(obj->IsHashTable()); |
2112 return reinterpret_cast<HashTable*>(obj); | 2112 return reinterpret_cast<HashTable*>(obj); |
2113 } | 2113 } |
2114 | 2114 |
2115 | 2115 |
2116 SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) | 2116 SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) |
2117 SMI_ACCESSORS(ByteArray, length, kLengthOffset) | |
2118 | |
2119 // TODO(1493): Investigate if it's possible to s/INT/SMI/ here (and | |
2120 // subsequently unify H{Fixed,External}ArrayLength). | |
2121 INT_ACCESSORS(ExternalArray, length, kLengthOffset) | |
2122 | |
2123 | 2117 |
2124 SMI_ACCESSORS(String, length, kLengthOffset) | 2118 SMI_ACCESSORS(String, length, kLengthOffset) |
2125 | 2119 |
2126 | 2120 |
2127 uint32_t String::hash_field() { | 2121 uint32_t String::hash_field() { |
2128 return READ_UINT32_FIELD(this, kHashFieldOffset); | 2122 return READ_UINT32_FIELD(this, kHashFieldOffset); |
2129 } | 2123 } |
2130 | 2124 |
2131 | 2125 |
2132 void String::set_hash_field(uint32_t value) { | 2126 void String::set_hash_field(uint32_t value) { |
(...skipping 2473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4606 #undef WRITE_INT_FIELD | 4600 #undef WRITE_INT_FIELD |
4607 #undef READ_SHORT_FIELD | 4601 #undef READ_SHORT_FIELD |
4608 #undef WRITE_SHORT_FIELD | 4602 #undef WRITE_SHORT_FIELD |
4609 #undef READ_BYTE_FIELD | 4603 #undef READ_BYTE_FIELD |
4610 #undef WRITE_BYTE_FIELD | 4604 #undef WRITE_BYTE_FIELD |
4611 | 4605 |
4612 | 4606 |
4613 } } // namespace v8::internal | 4607 } } // namespace v8::internal |
4614 | 4608 |
4615 #endif // V8_OBJECTS_INL_H_ | 4609 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |