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

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

Issue 1441453002: Avoid manual object's body traversal in GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments + removed HeapObject::ContentType() Created 5 years, 1 month 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
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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 INLINE(void ForceRecordSlot(HeapObject* object, Object** slot, 409 INLINE(void ForceRecordSlot(HeapObject* object, Object** slot,
410 Object* target)); 410 Object* target));
411 411
412 void UpdateSlots(SlotsBuffer* buffer); 412 void UpdateSlots(SlotsBuffer* buffer);
413 void UpdateSlotsRecordedIn(SlotsBuffer* buffer); 413 void UpdateSlotsRecordedIn(SlotsBuffer* buffer);
414 414
415 void MigrateObject(HeapObject* dst, HeapObject* src, int size, 415 void MigrateObject(HeapObject* dst, HeapObject* src, int size,
416 AllocationSpace to_old_space, 416 AllocationSpace to_old_space,
417 SlotsBuffer** evacuation_slots_buffer); 417 SlotsBuffer** evacuation_slots_buffer);
418 418
419 void MigrateObjectTagged(HeapObject* dst, HeapObject* src, int size,
420 SlotsBuffer** evacuation_slots_buffer);
421 void MigrateObjectMixed(HeapObject* dst, HeapObject* src, int size,
422 SlotsBuffer** evacuation_slots_buffer);
423 void MigrateObjectRaw(HeapObject* dst, HeapObject* src, int size);
424
425 bool TryPromoteObject(HeapObject* object, int object_size); 419 bool TryPromoteObject(HeapObject* object, int object_size);
426 420
427 void InvalidateCode(Code* code); 421 void InvalidateCode(Code* code);
428 422
429 void ClearMarkbits(); 423 void ClearMarkbits();
430 424
431 bool is_compacting() const { return compacting_; } 425 bool is_compacting() const { return compacting_; }
432 426
433 MarkingParity marking_parity() { return marking_parity_; } 427 MarkingParity marking_parity() { return marking_parity_; }
434 428
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 // ----------------------------------------------------------------------- 557 // -----------------------------------------------------------------------
564 // Phase 1: Marking live objects. 558 // Phase 1: Marking live objects.
565 // 559 //
566 // Before: The heap has been prepared for garbage collection by 560 // Before: The heap has been prepared for garbage collection by
567 // MarkCompactCollector::Prepare() and is otherwise in its 561 // MarkCompactCollector::Prepare() and is otherwise in its
568 // normal state. 562 // normal state.
569 // 563 //
570 // After: Live objects are marked and non-live objects are unmarked. 564 // After: Live objects are marked and non-live objects are unmarked.
571 565
572 friend class CodeMarkingVisitor; 566 friend class CodeMarkingVisitor;
567 friend class IncrementalMarkingMarkingVisitor;
573 friend class MarkCompactMarkingVisitor; 568 friend class MarkCompactMarkingVisitor;
574 friend class MarkingVisitor; 569 friend class MarkingVisitor;
570 friend class RecordMigratedSlotVisitor;
575 friend class RootMarkingVisitor; 571 friend class RootMarkingVisitor;
576 friend class SharedFunctionInfoMarkingVisitor; 572 friend class SharedFunctionInfoMarkingVisitor;
577 friend class IncrementalMarkingMarkingVisitor;
578 573
579 // Mark code objects that are active on the stack to prevent them 574 // Mark code objects that are active on the stack to prevent them
580 // from being flushed. 575 // from being flushed.
581 void PrepareThreadForCodeFlushing(Isolate* isolate, ThreadLocalTop* top); 576 void PrepareThreadForCodeFlushing(Isolate* isolate, ThreadLocalTop* top);
582 577
583 void PrepareForCodeFlushing(); 578 void PrepareForCodeFlushing();
584 579
585 // Marking operations for objects reachable from roots. 580 // Marking operations for objects reachable from roots.
586 void MarkLiveObjects(); 581 void MarkLiveObjects();
587 582
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 private: 857 private:
863 MarkCompactCollector* collector_; 858 MarkCompactCollector* collector_;
864 }; 859 };
865 860
866 861
867 const char* AllocationSpaceName(AllocationSpace space); 862 const char* AllocationSpaceName(AllocationSpace space);
868 } // namespace internal 863 } // namespace internal
869 } // namespace v8 864 } // namespace v8
870 865
871 #endif // V8_HEAP_MARK_COMPACT_H_ 866 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('j') | src/heap/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698