Index: src/incremental-marking.cc |
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc |
index 68b830a4df75e688eda8de939997dfba69ff63ff..471641bd25767d8318cc133676ff654750cc6845 100644 |
--- a/src/incremental-marking.cc |
+++ b/src/incremental-marking.cc |
@@ -60,6 +60,20 @@ void IncrementalMarking::TearDown() { |
} |
+void IncrementalMarking::RecordWriteSlow(HeapObject* obj, |
+ Object** slot, |
+ Object* value) { |
+ if (BaseRecordWrite(obj, slot, value) && is_compacting_ && slot != NULL) { |
+ MarkBit obj_bit = Marking::MarkBitFrom(obj); |
+ if (Marking::IsBlack(obj_bit)) { |
+ // Object is not going to be rescanned we need to record the slot. |
+ heap_->mark_compact_collector()->RecordSlot( |
+ HeapObject::RawField(obj, 0), slot, value); |
+ } |
+ } |
+} |
+ |
+ |
void IncrementalMarking::RecordWriteFromCode(HeapObject* obj, |
Object* value, |
Isolate* isolate) { |
@@ -108,7 +122,7 @@ void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) { |
} |
-void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, |
+void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, |
Object** slot, |
Erik Corry
2011/10/31 19:48:33
Formatting.
|
Code* value) { |
if (BaseRecordWrite(host, slot, value) && is_compacting_) { |
@@ -119,6 +133,30 @@ void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, |
} |
+void IncrementalMarking::RecordWriteIntoCodeSlow(HeapObject* obj, |
+ RelocInfo* rinfo, |
+ Object* value) { |
+ MarkBit value_bit = Marking::MarkBitFrom(HeapObject::cast(value)); |
+ if (Marking::IsWhite(value_bit)) { |
+ MarkBit obj_bit = Marking::MarkBitFrom(obj); |
+ if (Marking::IsBlack(obj_bit)) { |
+ BlackToGreyAndUnshift(obj, obj_bit); |
+ RestartIfNotMarking(); |
+ } |
+ // Object is either grey or white it will be scanned if survives. |
Erik Corry
2011/10/31 19:48:33
, or ; or : between "white" and "it"
|
+ return; |
+ } |
+ |
+ if (is_compacting_) { |
+ MarkBit obj_bit = Marking::MarkBitFrom(obj); |
+ if (Marking::IsBlack(obj_bit)) { |
+ // Object is not going to be rescanned we need to record the slot. |
Erik Corry
2011/10/31 19:48:33
Punctuation before "we"
|
+ heap_->mark_compact_collector()->RecordRelocSlot(rinfo, |
+ Code::cast(value)); |
+ } |
+ } |
+} |
+ |
class IncrementalMarkingMarkingVisitor : public ObjectVisitor { |
public: |