Index: src/mark-compact-inl.h |
diff --git a/src/mark-compact-inl.h b/src/mark-compact-inl.h |
index 64faf82dad7d773a51d91406ca5f99af706d8be4..a9107bd277fdbdabf0e891f79a3c2655c786d8e7 100644 |
--- a/src/mark-compact-inl.h |
+++ b/src/mark-compact-inl.h |
@@ -66,6 +66,19 @@ void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) { |
} |
+bool MarkCompactCollector::MarkObjectWithoutPush(HeapObject* object) { |
+ MarkBit mark = Marking::MarkBitFrom(object); |
+ bool old_mark = mark.Get(); |
+ if (!old_mark) SetMark(object, mark); |
+ return old_mark; |
+} |
+ |
+ |
+void MarkCompactCollector::MarkObjectAndPush(HeapObject* object) { |
+ if (!MarkObjectWithoutPush(object)) marking_deque_.PushBlack(object); |
+} |
+ |
+ |
void MarkCompactCollector::SetMark(HeapObject* obj, MarkBit mark_bit) { |
ASSERT(!mark_bit.Get()); |
ASSERT(Marking::MarkBitFrom(obj) == mark_bit); |