Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 80988db5853b14e865cf756a3ce3b40092ae2c61..1af3074f36c48f27c0689d2753ab865f8015447b 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -62,6 +62,7 @@ MarkCompactCollector::MarkCompactCollector() : // NOLINT |
sweep_precisely_(false), |
reduce_memory_footprint_(false), |
abort_incremental_marking_(false), |
+ marking_parity_(ODD_MARKING_PARITY), |
compacting_(false), |
was_marked_incrementally_(false), |
tracer_(NULL), |
@@ -404,6 +405,13 @@ void MarkCompactCollector::CollectGarbage() { |
Finish(); |
+ if (marking_parity_ == EVEN_MARKING_PARITY) { |
+ marking_parity_ = ODD_MARKING_PARITY; |
+ } else { |
+ ASSERT(marking_parity_ == ODD_MARKING_PARITY); |
+ marking_parity_ = EVEN_MARKING_PARITY; |
+ } |
+ |
tracer_ = NULL; |
} |
@@ -2397,6 +2405,16 @@ class PointersUpdatingVisitor: public ObjectVisitor { |
} |
} |
+ void VisitCodeAgeSequence(RelocInfo* rinfo) { |
+ ASSERT(RelocInfo::IsCodeAgeSequence(rinfo->rmode())); |
+ Object* stub = rinfo->code_age_stub(); |
+ ASSERT(stub != NULL); |
+ VisitPointer(&stub); |
+ if (stub != rinfo->code_age_stub()) { |
+ rinfo->set_code_age_stub(Code::cast(stub)); |
+ } |
+ } |
+ |
void VisitDebugTarget(RelocInfo* rinfo) { |
ASSERT((RelocInfo::IsJSReturn(rinfo->rmode()) && |
rinfo->IsPatchedReturnSequence()) || |