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

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

Issue 2492263002: [heap] Add atomics to mark bit operations. (Closed)
Patch Set: comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/marking.h » ('j') | 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 dd45c382fd4867d6090873b3efed05ff246c2932..8c03dc980c7df675b44735f8a899dd90d5a91e7b 100644
--- a/src/heap/mark-compact-inl.h
+++ b/src/heap/mark-compact-inl.h
@@ -14,9 +14,9 @@ namespace internal {
template <MarkingMode mode>
void MarkCompactCollector::PushBlack(HeapObject* obj) {
- DCHECK(ObjectMarking::IsBlack<mode>(obj));
+ DCHECK((ObjectMarking::IsBlack<MarkBit::NON_ATOMIC, mode>(obj)));
if (!marking_deque<mode>()->Push(obj)) {
- ObjectMarking::BlackToGrey<mode>(obj);
+ ObjectMarking::BlackToGrey<MarkBit::NON_ATOMIC, mode>(obj);
}
}
@@ -30,8 +30,8 @@ void MarkCompactCollector::UnshiftBlack(HeapObject* obj) {
template <MarkingMode mode>
void MarkCompactCollector::MarkObject(HeapObject* obj) {
- if (ObjectMarking::IsWhite<mode>(obj)) {
- ObjectMarking::WhiteToBlack<mode>(obj);
+ if (ObjectMarking::IsWhite<MarkBit::NON_ATOMIC, mode>(obj)) {
+ ObjectMarking::WhiteToBlack<MarkBit::NON_ATOMIC, mode>(obj);
PushBlack<mode>(obj);
}
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698