OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_HEAP_MARK_COMPACT_INL_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_INL_H_ |
6 #define V8_HEAP_MARK_COMPACT_INL_H_ | 6 #define V8_HEAP_MARK_COMPACT_INL_H_ |
7 | 7 |
8 #include "src/heap/mark-compact.h" | 8 #include "src/heap/mark-compact.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 | 54 |
55 void MarkCompactCollector::RecordSlot(Object** anchor_slot, Object** slot, | 55 void MarkCompactCollector::RecordSlot(Object** anchor_slot, Object** slot, |
56 Object* object, | 56 Object* object, |
57 SlotsBuffer::AdditionMode mode) { | 57 SlotsBuffer::AdditionMode mode) { |
58 Page* object_page = Page::FromAddress(reinterpret_cast<Address>(object)); | 58 Page* object_page = Page::FromAddress(reinterpret_cast<Address>(object)); |
59 if (object_page->IsEvacuationCandidate() && | 59 if (object_page->IsEvacuationCandidate() && |
60 !ShouldSkipEvacuationSlotRecording(anchor_slot)) { | 60 !ShouldSkipEvacuationSlotRecording(anchor_slot)) { |
61 if (!SlotsBuffer::AddTo(&slots_buffer_allocator_, | 61 if (!SlotsBuffer::AddTo(&slots_buffer_allocator_, |
62 object_page->slots_buffer_address(), slot, mode)) { | 62 object_page->slots_buffer_address(), slot, mode)) { |
63 EvictEvacuationCandidate(object_page); | 63 EvictPopularEvacuationCandidate(object_page); |
64 } | 64 } |
65 } | 65 } |
66 } | 66 } |
67 } | 67 } |
68 } // namespace v8::internal | 68 } // namespace v8::internal |
69 | 69 |
70 #endif // V8_HEAP_MARK_COMPACT_INL_H_ | 70 #endif // V8_HEAP_MARK_COMPACT_INL_H_ |
OLD | NEW |