Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: src/heap/mark-compact.h

Issue 1259613006: Change RecordSlot interface. Make it more robust by replacing anchor slot with actual object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/heap/spaces.h" 9 #include "src/heap/spaces.h"
10 10
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 enum SweepingParallelism { SWEEP_ON_MAIN_THREAD, SWEEP_IN_PARALLEL }; 633 enum SweepingParallelism { SWEEP_ON_MAIN_THREAD, SWEEP_IN_PARALLEL };
634 634
635 #ifdef VERIFY_HEAP 635 #ifdef VERIFY_HEAP
636 void VerifyMarkbitsAreClean(); 636 void VerifyMarkbitsAreClean();
637 static void VerifyMarkbitsAreClean(PagedSpace* space); 637 static void VerifyMarkbitsAreClean(PagedSpace* space);
638 static void VerifyMarkbitsAreClean(NewSpace* space); 638 static void VerifyMarkbitsAreClean(NewSpace* space);
639 void VerifyWeakEmbeddedObjectsInCode(); 639 void VerifyWeakEmbeddedObjectsInCode();
640 void VerifyOmittedMapChecks(); 640 void VerifyOmittedMapChecks();
641 #endif 641 #endif
642 642
643 INLINE(static bool ShouldSkipEvacuationSlotRecording(Object** anchor)) {
644 return Page::FromAddress(reinterpret_cast<Address>(anchor))
645 ->ShouldSkipEvacuationSlotRecording();
646 }
647
648 INLINE(static bool ShouldSkipEvacuationSlotRecording(Object* host)) { 643 INLINE(static bool ShouldSkipEvacuationSlotRecording(Object* host)) {
649 return Page::FromAddress(reinterpret_cast<Address>(host)) 644 return Page::FromAddress(reinterpret_cast<Address>(host))
650 ->ShouldSkipEvacuationSlotRecording(); 645 ->ShouldSkipEvacuationSlotRecording();
651 } 646 }
652 647
653 INLINE(static bool IsOnEvacuationCandidate(Object* obj)) { 648 INLINE(static bool IsOnEvacuationCandidate(Object* obj)) {
654 return Page::FromAddress(reinterpret_cast<Address>(obj)) 649 return Page::FromAddress(reinterpret_cast<Address>(obj))
655 ->IsEvacuationCandidate(); 650 ->IsEvacuationCandidate();
656 } 651 }
657 652
658 void RecordRelocSlot(RelocInfo* rinfo, Object* target); 653 void RecordRelocSlot(RelocInfo* rinfo, Object* target);
659 void RecordCodeEntrySlot(Address slot, Code* target); 654 void RecordCodeEntrySlot(HeapObject* object, Address slot, Code* target);
660 void RecordCodeTargetPatch(Address pc, Code* target); 655 void RecordCodeTargetPatch(Address pc, Code* target);
661 656
662 INLINE(void RecordSlot( 657 INLINE(void RecordSlot(
663 Object** anchor_slot, Object** slot, Object* object, 658 HeapObject* object, Object** slot, Object* target,
664 SlotsBuffer::AdditionMode mode = SlotsBuffer::FAIL_ON_OVERFLOW)); 659 SlotsBuffer::AdditionMode mode = SlotsBuffer::FAIL_ON_OVERFLOW));
665 660
666 void MigrateObject(HeapObject* dst, HeapObject* src, int size, 661 void MigrateObject(HeapObject* dst, HeapObject* src, int size,
667 AllocationSpace to_old_space); 662 AllocationSpace to_old_space);
668 663
669 void MigrateObjectTagged(HeapObject* dst, HeapObject* src, int size); 664 void MigrateObjectTagged(HeapObject* dst, HeapObject* src, int size);
670 void MigrateObjectMixed(HeapObject* dst, HeapObject* src, int size); 665 void MigrateObjectMixed(HeapObject* dst, HeapObject* src, int size);
671 void MigrateObjectRaw(HeapObject* dst, HeapObject* src, int size); 666 void MigrateObjectRaw(HeapObject* dst, HeapObject* src, int size);
672 667
673 bool TryPromoteObject(HeapObject* object, int object_size); 668 bool TryPromoteObject(HeapObject* object, int object_size);
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 private: 1035 private:
1041 MarkCompactCollector* collector_; 1036 MarkCompactCollector* collector_;
1042 }; 1037 };
1043 1038
1044 1039
1045 const char* AllocationSpaceName(AllocationSpace space); 1040 const char* AllocationSpaceName(AllocationSpace space);
1046 } 1041 }
1047 } // namespace v8::internal 1042 } // namespace v8::internal
1048 1043
1049 #endif // V8_HEAP_MARK_COMPACT_H_ 1044 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698