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

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

Issue 2857713002: [heap] Make non-atomic markbit operations consistent with atomic ones. (Closed)
Patch Set: remove dcheck Created 3 years, 8 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
Index: src/heap/incremental-marking.h
diff --git a/src/heap/incremental-marking.h b/src/heap/incremental-marking.h
index 200fbf39c48a8114bc3faf271e90a232ab8ee930..b827f6aba17fb90411ac0c2b3911899c97475214 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -44,9 +44,6 @@ class V8_EXPORT_PRIVATE IncrementalMarking {
return MarkingState::Internal(chunk);
}
- void MarkBlack(HeapObject* object, int size);
- void MarkGrey(HeapObject* object);
-
// Transfers mark bits without requiring proper object headers.
void TransferMark(Heap* heap, HeapObject* from, HeapObject* to);
@@ -61,9 +58,15 @@ class V8_EXPORT_PRIVATE IncrementalMarking {
DCHECK(ObjectMarking::IsWhite<access_mode>(to, marking_state(to)));
if (ObjectMarking::IsGrey<access_mode>(from, marking_state(from))) {
- ObjectMarking::WhiteToGrey<access_mode>(to, marking_state(to));
+ bool success =
+ ObjectMarking::WhiteToGrey<access_mode>(to, marking_state(to));
+ DCHECK(success);
+ USE(success);
} else if (ObjectMarking::IsBlack<access_mode>(from, marking_state(from))) {
- ObjectMarking::WhiteToBlack<access_mode>(to, marking_state(to));
+ bool success =
+ ObjectMarking::WhiteToBlack<access_mode>(to, marking_state(to));
+ DCHECK(success);
+ USE(success);
}
}
@@ -189,7 +192,7 @@ class V8_EXPORT_PRIVATE IncrementalMarking {
void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value);
void RecordCodeTargetPatch(Address pc, HeapObject* value);
- void WhiteToGreyAndPush(HeapObject* obj);
+ bool WhiteToGreyAndPush(HeapObject* obj);
Michael Lippautz 2017/05/03 07:48:39 nit: Please add a comment indicating what the retu
ulan 2017/05/03 08:51:55 Done.
inline void SetOldSpacePageFlags(MemoryChunk* chunk) {
SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting());

Powered by Google App Engine
This is Rietveld 408576698