Chromium Code Reviews| Index: src/mark-compact.cc |
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
| index 2704f51f0adf83ed3d90a1de4dcb14ce0e189c4a..5253c093e2b586538c7adc654ac10e0367f34512 100644 |
| --- a/src/mark-compact.cc |
| +++ b/src/mark-compact.cc |
| @@ -4079,6 +4079,21 @@ 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); |
| + ASSERT(Marking::IsBlack(mark_bit)); |
|
ulan
2012/10/02 11:39:06
Don't forget to remove this assert :)
Michael Starzinger
2012/10/02 15:44:33
Done. Oops, forgot that.
|
| + 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)); |