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 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 | 1268 |
1269 MapWord MapWord::FromMap(const Map* map) { | 1269 MapWord MapWord::FromMap(const Map* map) { |
1270 return MapWord(reinterpret_cast<uintptr_t>(map)); | 1270 return MapWord(reinterpret_cast<uintptr_t>(map)); |
1271 } | 1271 } |
1272 | 1272 |
1273 | 1273 |
1274 Map* MapWord::ToMap() { | 1274 Map* MapWord::ToMap() { |
1275 return reinterpret_cast<Map*>(value_); | 1275 return reinterpret_cast<Map*>(value_); |
1276 } | 1276 } |
1277 | 1277 |
1278 bool MapWord::IsForwardingAddress() const { | 1278 |
| 1279 bool MapWord::IsForwardingAddress() { |
1279 return HAS_SMI_TAG(reinterpret_cast<Object*>(value_)); | 1280 return HAS_SMI_TAG(reinterpret_cast<Object*>(value_)); |
1280 } | 1281 } |
1281 | 1282 |
1282 | 1283 |
1283 MapWord MapWord::FromForwardingAddress(HeapObject* object) { | 1284 MapWord MapWord::FromForwardingAddress(HeapObject* object) { |
1284 Address raw = reinterpret_cast<Address>(object) - kHeapObjectTag; | 1285 Address raw = reinterpret_cast<Address>(object) - kHeapObjectTag; |
1285 return MapWord(reinterpret_cast<uintptr_t>(raw)); | 1286 return MapWord(reinterpret_cast<uintptr_t>(raw)); |
1286 } | 1287 } |
1287 | 1288 |
1288 | 1289 |
(...skipping 6734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8023 #undef WRITE_INT64_FIELD | 8024 #undef WRITE_INT64_FIELD |
8024 #undef READ_BYTE_FIELD | 8025 #undef READ_BYTE_FIELD |
8025 #undef WRITE_BYTE_FIELD | 8026 #undef WRITE_BYTE_FIELD |
8026 #undef NOBARRIER_READ_BYTE_FIELD | 8027 #undef NOBARRIER_READ_BYTE_FIELD |
8027 #undef NOBARRIER_WRITE_BYTE_FIELD | 8028 #undef NOBARRIER_WRITE_BYTE_FIELD |
8028 | 8029 |
8029 } // namespace internal | 8030 } // namespace internal |
8030 } // namespace v8 | 8031 } // namespace v8 |
8031 | 8032 |
8032 #endif // V8_OBJECTS_INL_H_ | 8033 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |