| Index: src/heap/mark-compact-inl.h
|
| diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h
|
| index 968dc0997cb44f904b948f4884bcae1259aba9d2..6e3ebd7fc7ffbee83b1209679bd9d87e65a0f77c 100644
|
| --- a/src/heap/mark-compact-inl.h
|
| +++ b/src/heap/mark-compact-inl.h
|
| @@ -6,6 +6,7 @@
|
| #define V8_HEAP_MARK_COMPACT_INL_H_
|
|
|
| #include "src/heap/mark-compact.h"
|
| +#include "src/heap/slots-buffer.h"
|
| #include "src/isolate.h"
|
|
|
| namespace v8 {
|
| @@ -55,6 +56,32 @@ bool MarkCompactCollector::IsMarked(Object* obj) {
|
| }
|
|
|
|
|
| +void MarkCompactCollector::RecordSlot(HeapObject* object, Object** slot,
|
| + Object* target) {
|
| + Page* target_page = Page::FromAddress(reinterpret_cast<Address>(target));
|
| + if (target_page->IsEvacuationCandidate() &&
|
| + !ShouldSkipEvacuationSlotRecording(object)) {
|
| + if (!SlotsBuffer::AddTo(slots_buffer_allocator_,
|
| + target_page->slots_buffer_address(), slot,
|
| + SlotsBuffer::FAIL_ON_OVERFLOW)) {
|
| + EvictPopularEvacuationCandidate(target_page);
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| +void MarkCompactCollector::ForceRecordSlot(HeapObject* object, Object** slot,
|
| + Object* target) {
|
| + Page* target_page = Page::FromAddress(reinterpret_cast<Address>(target));
|
| + if (target_page->IsEvacuationCandidate() &&
|
| + !ShouldSkipEvacuationSlotRecording(object)) {
|
| + CHECK(SlotsBuffer::AddTo(slots_buffer_allocator_,
|
| + target_page->slots_buffer_address(), slot,
|
| + SlotsBuffer::IGNORE_OVERFLOW));
|
| + }
|
| +}
|
| +
|
| +
|
| void CodeFlusher::AddCandidate(SharedFunctionInfo* shared_info) {
|
| if (GetNextCandidate(shared_info) == NULL) {
|
| SetNextCandidate(shared_info, shared_function_info_candidates_head_);
|
|
|