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

Side by Side Diff: third_party/WebKit/Source/platform/heap/SparseHeapBitmap.cpp

Issue 2642933005: Have VisitorHelper<> handle moving object registration. (Closed)
Patch Set: msvc compile fix Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium 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 #include "platform/heap/SparseHeapBitmap.h" 5 #include "platform/heap/SparseHeapBitmap.h"
6 6
7 #include "platform/heap/Heap.h"
7 #include "wtf/PtrUtil.h" 8 #include "wtf/PtrUtil.h"
8 9
9 namespace blink { 10 namespace blink {
10 11
11 // Return the subtree/bitmap that covers the 12 // Return the subtree/bitmap that covers the
12 // [address, address + size) range. Null if there is none. 13 // [address, address + size) range. Null if there is none.
13 SparseHeapBitmap* SparseHeapBitmap::hasRange(Address address, size_t size) { 14 SparseHeapBitmap* SparseHeapBitmap::hasRange(Address address, size_t size) {
14 DCHECK(!(reinterpret_cast<uintptr_t>(address) & s_pointerAlignmentMask)); 15 DCHECK(!(reinterpret_cast<uintptr_t>(address) & s_pointerAlignmentMask));
15 SparseHeapBitmap* bitmap = this; 16 SparseHeapBitmap* bitmap = this;
16 while (bitmap) { 17 while (bitmap) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 size_t SparseHeapBitmap::intervalCount() const { 103 size_t SparseHeapBitmap::intervalCount() const {
103 size_t count = 1; 104 size_t count = 1;
104 if (m_left) 105 if (m_left)
105 count += m_left->intervalCount(); 106 count += m_left->intervalCount();
106 if (m_right) 107 if (m_right)
107 count += m_right->intervalCount(); 108 count += m_right->intervalCount();
108 return count; 109 return count;
109 } 110 }
110 111
111 } // namespace blink 112 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h ('k') | third_party/WebKit/Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698