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

Unified Diff: src/heap/mark-compact-inl.h

Issue 1794383004: [heap] Do not clear second bit when iterating for grey objects on black pages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact-inl.h
diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h
index 9df79746ee64a12eea471412115f5bf70303303b..5932c6e4fa22873294da5455e91824c918263e23 100644
--- a/src/heap/mark-compact-inl.h
+++ b/src/heap/mark-compact-inl.h
@@ -182,8 +182,11 @@ HeapObject* LiveObjectIterator<T>::Next() {
} else if (T == kGreyObjectsOnBlackPage) {
object = HeapObject::FromAddress(addr);
}
- // Clear the second bit of the found object.
- current_cell_ &= ~second_bit_index;
+
+ if (T != kGreyObjectsOnBlackPage) {
+ // Clear the second bit of the found object.
+ current_cell_ &= ~second_bit_index;
+ }
// We found a live object.
if (object != nullptr) break;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698