| 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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 void HeapObject::synchronized_set_map_no_write_barrier(Map* value) { | 1518 void HeapObject::synchronized_set_map_no_write_barrier(Map* value) { |
| 1519 synchronized_set_map_word(MapWord::FromMap(value)); | 1519 synchronized_set_map_word(MapWord::FromMap(value)); |
| 1520 } | 1520 } |
| 1521 | 1521 |
| 1522 | 1522 |
| 1523 // Unsafe accessor omitting write barrier. | 1523 // Unsafe accessor omitting write barrier. |
| 1524 void HeapObject::set_map_no_write_barrier(Map* value) { | 1524 void HeapObject::set_map_no_write_barrier(Map* value) { |
| 1525 set_map_word(MapWord::FromMap(value)); | 1525 set_map_word(MapWord::FromMap(value)); |
| 1526 } | 1526 } |
| 1527 | 1527 |
| 1528 HeapObject** HeapObject::map_slot() { |
| 1529 return reinterpret_cast<HeapObject**>(FIELD_ADDR(this, kMapOffset)); |
| 1530 } |
| 1528 | 1531 |
| 1529 MapWord HeapObject::map_word() const { | 1532 MapWord HeapObject::map_word() const { |
| 1530 return MapWord( | 1533 return MapWord( |
| 1531 reinterpret_cast<uintptr_t>(NOBARRIER_READ_FIELD(this, kMapOffset))); | 1534 reinterpret_cast<uintptr_t>(NOBARRIER_READ_FIELD(this, kMapOffset))); |
| 1532 } | 1535 } |
| 1533 | 1536 |
| 1534 | 1537 |
| 1535 void HeapObject::set_map_word(MapWord map_word) { | 1538 void HeapObject::set_map_word(MapWord map_word) { |
| 1536 NOBARRIER_WRITE_FIELD( | 1539 NOBARRIER_WRITE_FIELD( |
| 1537 this, kMapOffset, reinterpret_cast<Object*>(map_word.value_)); | 1540 this, kMapOffset, reinterpret_cast<Object*>(map_word.value_)); |
| (...skipping 6701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8239 #undef WRITE_BYTE_FIELD | 8242 #undef WRITE_BYTE_FIELD |
| 8240 #undef NOBARRIER_READ_BYTE_FIELD | 8243 #undef NOBARRIER_READ_BYTE_FIELD |
| 8241 #undef NOBARRIER_WRITE_BYTE_FIELD | 8244 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8242 | 8245 |
| 8243 } // namespace internal | 8246 } // namespace internal |
| 8244 } // namespace v8 | 8247 } // namespace v8 |
| 8245 | 8248 |
| 8246 #include "src/objects/object-macros-undef.h" | 8249 #include "src/objects/object-macros-undef.h" |
| 8247 | 8250 |
| 8248 #endif // V8_OBJECTS_INL_H_ | 8251 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |