| 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 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 | 1256 |
| 1257 MapWord MapWord::FromMap(const Map* map) { | 1257 MapWord MapWord::FromMap(const Map* map) { |
| 1258 return MapWord(reinterpret_cast<uintptr_t>(map)); | 1258 return MapWord(reinterpret_cast<uintptr_t>(map)); |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 | 1261 |
| 1262 Map* MapWord::ToMap() { | 1262 Map* MapWord::ToMap() { |
| 1263 return reinterpret_cast<Map*>(value_); | 1263 return reinterpret_cast<Map*>(value_); |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 | 1266 bool MapWord::IsForwardingAddress() const { |
| 1267 bool MapWord::IsForwardingAddress() { | |
| 1268 return HAS_SMI_TAG(reinterpret_cast<Object*>(value_)); | 1267 return HAS_SMI_TAG(reinterpret_cast<Object*>(value_)); |
| 1269 } | 1268 } |
| 1270 | 1269 |
| 1271 | 1270 |
| 1272 MapWord MapWord::FromForwardingAddress(HeapObject* object) { | 1271 MapWord MapWord::FromForwardingAddress(HeapObject* object) { |
| 1273 Address raw = reinterpret_cast<Address>(object) - kHeapObjectTag; | 1272 Address raw = reinterpret_cast<Address>(object) - kHeapObjectTag; |
| 1274 return MapWord(reinterpret_cast<uintptr_t>(raw)); | 1273 return MapWord(reinterpret_cast<uintptr_t>(raw)); |
| 1275 } | 1274 } |
| 1276 | 1275 |
| 1277 | 1276 |
| (...skipping 6617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7895 #undef WRITE_INT64_FIELD | 7894 #undef WRITE_INT64_FIELD |
| 7896 #undef READ_BYTE_FIELD | 7895 #undef READ_BYTE_FIELD |
| 7897 #undef WRITE_BYTE_FIELD | 7896 #undef WRITE_BYTE_FIELD |
| 7898 #undef NOBARRIER_READ_BYTE_FIELD | 7897 #undef NOBARRIER_READ_BYTE_FIELD |
| 7899 #undef NOBARRIER_WRITE_BYTE_FIELD | 7898 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7900 | 7899 |
| 7901 } // namespace internal | 7900 } // namespace internal |
| 7902 } // namespace v8 | 7901 } // namespace v8 |
| 7903 | 7902 |
| 7904 #endif // V8_OBJECTS_INL_H_ | 7903 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |