Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 2704f51f0adf83ed3d90a1de4dcb14ce0e189c4a..f027677cd13f7122f8f498e14d0c64231c27a517 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -4079,6 +4079,20 @@ void MarkCompactCollector::RecordCodeEntrySlot(Address slot, Code* target) { |
} |
+void MarkCompactCollector::RecordCodeTargetPatch(Address pc, Code* target) { |
+ ASSERT(heap()->gc_state() == Heap::MARK_COMPACT); |
+ if(is_compacting()) { |
+ Code* host = heap()->isolate()->inner_pointer_to_code_cache()-> |
+ GcSafeFindCodeForInnerPointer(pc); |
+ MarkBit mark_bit = Marking::MarkBitFrom(host); |
+ if (Marking::IsBlack(mark_bit)) { |
+ RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host); |
+ RecordRelocSlot(&rinfo, target); |
+ } |
+ } |
+} |
+ |
+ |
static inline SlotsBuffer::SlotType DecodeSlotType( |
SlotsBuffer::ObjectSlot slot) { |
return static_cast<SlotsBuffer::SlotType>(reinterpret_cast<intptr_t>(slot)); |