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

Unified Diff: src/heap/incremental-marking.h

Issue 2723853006: [heap] Use ObjectMarking in TransferMark. (Closed)
Patch Set: [heap] Use ObjectMarking in TransferMark. Created 3 years, 10 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 | src/heap/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.h
diff --git a/src/heap/incremental-marking.h b/src/heap/incremental-marking.h
index 37f1e5cec114df144e2164925758ee5d45f20d46..19fa546edcf689fdd8663ab9fb9cc1532dd416c5 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -185,26 +185,19 @@ class V8_EXPORT_PRIVATE IncrementalMarking {
static void TransferMark(Heap* heap, HeapObject* from, HeapObject* to);
- // Returns true if the color transfer requires live bytes updating.
- INLINE(static bool TransferColor(HeapObject* from, HeapObject* to,
+ INLINE(static void TransferColor(HeapObject* from, HeapObject* to,
int size)) {
- MarkBit from_mark_bit = ObjectMarking::MarkBitFrom(from);
- MarkBit to_mark_bit = ObjectMarking::MarkBitFrom(to);
-
- if (Marking::IsBlack(to_mark_bit)) {
+ if (ObjectMarking::IsBlack(to)) {
DCHECK(to->GetHeap()->incremental_marking()->black_allocation());
- return false;
+ return;
}
- DCHECK(Marking::IsWhite(to_mark_bit));
- if (from_mark_bit.Get()) {
- to_mark_bit.Set();
- if (from_mark_bit.Next().Get()) {
- to_mark_bit.Next().Set();
- return true;
- }
+ DCHECK(ObjectMarking::IsWhite(to));
+ if (ObjectMarking::IsGrey(from)) {
+ ObjectMarking::WhiteToGrey(to);
+ } else if (ObjectMarking::IsBlack(from)) {
+ ObjectMarking::WhiteToBlack(to);
}
- return false;
}
void IterateBlackObject(HeapObject* object);
« no previous file with comments | « no previous file | src/heap/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698