Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/objects-inl.h

Issue 1416003003: Cleanup FreeSpace: Remove getter for address of next pointer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698