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

Side by Side Diff: src/heap/mark-compact-inl.h

Issue 2731363002: [heap] Do not clear mark bits of left trimmed old object start. (Closed)
Patch Set: comment fix Created 3 years, 9 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/heap/incremental-marking.cc ('k') | src/heap/marking.h » ('j') | 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 #ifndef V8_HEAP_MARK_COMPACT_INL_H_ 5 #ifndef V8_HEAP_MARK_COMPACT_INL_H_
6 #define V8_HEAP_MARK_COMPACT_INL_H_ 6 #define V8_HEAP_MARK_COMPACT_INL_H_
7 7
8 #include "src/heap/mark-compact.h" 8 #include "src/heap/mark-compact.h"
9 #include "src/heap/remembered-set.h" 9 #include "src/heap/remembered-set.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (T == kBlackObjects || T == kAllLiveObjects) { 172 if (T == kBlackObjects || T == kAllLiveObjects) {
173 object = black_object; 173 object = black_object;
174 } 174 }
175 } else if ((T == kGreyObjects || T == kAllLiveObjects)) { 175 } else if ((T == kGreyObjects || T == kAllLiveObjects)) {
176 map = base::NoBarrierAtomicValue<Map*>::FromAddress(addr)->Value(); 176 map = base::NoBarrierAtomicValue<Map*>::FromAddress(addr)->Value();
177 object = HeapObject::FromAddress(addr); 177 object = HeapObject::FromAddress(addr);
178 } 178 }
179 179
180 // We found a live object. 180 // We found a live object.
181 if (object != nullptr) { 181 if (object != nullptr) {
182 if (map == heap()->one_pointer_filler_map()) { 182 if (object->IsFiller()) {
183 // Black areas together with slack tracking may result in black one 183 // There are two reasons why we can get black or grey fillers:
184 // word filler objects. We filter these objects out in the iterator. 184 // 1) Black areas together with slack tracking may result in black one
185 // word filler objects.
186 // 2) Left trimming may leave black or grey fillers behind because we
187 // do not clear the old location of the object start.
188 // We filter these objects out in the iterator.
185 object = nullptr; 189 object = nullptr;
186 } else { 190 } else {
187 break; 191 break;
188 } 192 }
189 } 193 }
190 } 194 }
191 195
192 if (current_cell_ == 0) { 196 if (current_cell_ == 0) {
193 if (!it_.Done()) { 197 if (!it_.Done()) {
194 it_.Advance(); 198 it_.Advance();
195 cell_base_ = it_.CurrentCellBase(); 199 cell_base_ = it_.CurrentCellBase();
196 current_cell_ = *it_.CurrentCell(); 200 current_cell_ = *it_.CurrentCell();
197 } 201 }
198 } 202 }
199 if (object != nullptr) return object; 203 if (object != nullptr) return object;
200 } 204 }
201 return nullptr; 205 return nullptr;
202 } 206 }
203 207
204 } // namespace internal 208 } // namespace internal
205 } // namespace v8 209 } // namespace v8
206 210
207 #endif // V8_HEAP_MARK_COMPACT_INL_H_ 211 #endif // V8_HEAP_MARK_COMPACT_INL_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698