| 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 3649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3660 | 3660 |
| 3661 FreeSpace* FreeSpace::next() { | 3661 FreeSpace* FreeSpace::next() { |
| 3662 DCHECK(map() == GetHeap()->root(Heap::kFreeSpaceMapRootIndex) || | 3662 DCHECK(map() == GetHeap()->root(Heap::kFreeSpaceMapRootIndex) || |
| 3663 (!GetHeap()->deserialization_complete() && map() == NULL)); | 3663 (!GetHeap()->deserialization_complete() && map() == NULL)); |
| 3664 DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); | 3664 DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); |
| 3665 return reinterpret_cast<FreeSpace*>( | 3665 return reinterpret_cast<FreeSpace*>( |
| 3666 Memory::Address_at(address() + kNextOffset)); | 3666 Memory::Address_at(address() + kNextOffset)); |
| 3667 } | 3667 } |
| 3668 | 3668 |
| 3669 | 3669 |
| 3670 FreeSpace** FreeSpace::next_address() { | |
| 3671 DCHECK(map() == GetHeap()->root(Heap::kFreeSpaceMapRootIndex) || | |
| 3672 (!GetHeap()->deserialization_complete() && map() == NULL)); | |
| 3673 DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); | |
| 3674 return reinterpret_cast<FreeSpace**>(address() + kNextOffset); | |
| 3675 } | |
| 3676 | |
| 3677 | |
| 3678 void FreeSpace::set_next(FreeSpace* next) { | 3670 void FreeSpace::set_next(FreeSpace* next) { |
| 3679 DCHECK(map() == GetHeap()->root(Heap::kFreeSpaceMapRootIndex) || | 3671 DCHECK(map() == GetHeap()->root(Heap::kFreeSpaceMapRootIndex) || |
| 3680 (!GetHeap()->deserialization_complete() && map() == NULL)); | 3672 (!GetHeap()->deserialization_complete() && map() == NULL)); |
| 3681 DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); | 3673 DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); |
| 3682 base::NoBarrier_Store( | 3674 base::NoBarrier_Store( |
| 3683 reinterpret_cast<base::AtomicWord*>(address() + kNextOffset), | 3675 reinterpret_cast<base::AtomicWord*>(address() + kNextOffset), |
| 3684 reinterpret_cast<base::AtomicWord>(next)); | 3676 reinterpret_cast<base::AtomicWord>(next)); |
| 3685 } | 3677 } |
| 3686 | 3678 |
| 3687 | 3679 |
| (...skipping 4451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8139 #undef WRITE_INT64_FIELD | 8131 #undef WRITE_INT64_FIELD |
| 8140 #undef READ_BYTE_FIELD | 8132 #undef READ_BYTE_FIELD |
| 8141 #undef WRITE_BYTE_FIELD | 8133 #undef WRITE_BYTE_FIELD |
| 8142 #undef NOBARRIER_READ_BYTE_FIELD | 8134 #undef NOBARRIER_READ_BYTE_FIELD |
| 8143 #undef NOBARRIER_WRITE_BYTE_FIELD | 8135 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8144 | 8136 |
| 8145 } // namespace internal | 8137 } // namespace internal |
| 8146 } // namespace v8 | 8138 } // namespace v8 |
| 8147 | 8139 |
| 8148 #endif // V8_OBJECTS_INL_H_ | 8140 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |