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_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 void VerifyWeakEmbeddedObjectsInCode(); | 466 void VerifyWeakEmbeddedObjectsInCode(); |
467 void VerifyOmittedMapChecks(); | 467 void VerifyOmittedMapChecks(); |
468 #endif | 468 #endif |
469 | 469 |
470 INLINE(static bool ShouldSkipEvacuationSlotRecording(Object* host)) { | 470 INLINE(static bool ShouldSkipEvacuationSlotRecording(Object* host)) { |
471 return Page::FromAddress(reinterpret_cast<Address>(host)) | 471 return Page::FromAddress(reinterpret_cast<Address>(host)) |
472 ->ShouldSkipEvacuationSlotRecording(); | 472 ->ShouldSkipEvacuationSlotRecording(); |
473 } | 473 } |
474 | 474 |
475 INLINE(static bool IsOnEvacuationCandidate(Object* obj)) { | 475 INLINE(static bool IsOnEvacuationCandidate(Object* obj)) { |
476 return Page::FromAddress(reinterpret_cast<Address>(obj)) | 476 return obj->IsHeapObject() && |
477 ->IsEvacuationCandidate(); | 477 Page::FromAddress(reinterpret_cast<Address>(obj)) |
| 478 ->IsEvacuationCandidate(); |
478 } | 479 } |
479 | 480 |
480 void RecordRelocSlot(Code* host, RelocInfo* rinfo, Object* target); | 481 void RecordRelocSlot(Code* host, RelocInfo* rinfo, Object* target); |
481 void RecordCodeEntrySlot(HeapObject* host, Address slot, Code* target); | 482 void RecordCodeEntrySlot(HeapObject* host, Address slot, Code* target); |
482 void RecordCodeTargetPatch(Address pc, Code* target); | 483 void RecordCodeTargetPatch(Address pc, Code* target); |
483 INLINE(void RecordSlot(HeapObject* object, Object** slot, Object* target)); | 484 INLINE(void RecordSlot(HeapObject* object, Object** slot, Object* target)); |
484 INLINE(void ForceRecordSlot(HeapObject* object, Object** slot, | 485 INLINE(void ForceRecordSlot(HeapObject* object, Object** slot, |
485 Object* target)); | 486 Object* target)); |
486 | 487 |
487 void UpdateSlots(SlotsBuffer* buffer); | 488 void UpdateSlots(SlotsBuffer* buffer); |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 | 773 |
773 private: | 774 private: |
774 MarkCompactCollector* collector_; | 775 MarkCompactCollector* collector_; |
775 }; | 776 }; |
776 | 777 |
777 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); | 778 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); |
778 } // namespace internal | 779 } // namespace internal |
779 } // namespace v8 | 780 } // namespace v8 |
780 | 781 |
781 #endif // V8_HEAP_MARK_COMPACT_H_ | 782 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |