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

Side by Side Diff: src/heap/heap.h

Issue 2102243002: [heap] Iterate handles with special left-trim visitor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 5 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 | « no previous file | src/heap/heap.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_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 static double HeapGrowingFactor(double gc_speed, double mutator_speed); 625 static double HeapGrowingFactor(double gc_speed, double mutator_speed);
626 626
627 // Copy block of memory from src to dst. Size of block should be aligned 627 // Copy block of memory from src to dst. Size of block should be aligned
628 // by pointer size. 628 // by pointer size.
629 static inline void CopyBlock(Address dst, Address src, int byte_size); 629 static inline void CopyBlock(Address dst, Address src, int byte_size);
630 630
631 // Determines a static visitor id based on the given {map} that can then be 631 // Determines a static visitor id based on the given {map} that can then be
632 // stored on the map to facilitate fast dispatch for {StaticVisitorBase}. 632 // stored on the map to facilitate fast dispatch for {StaticVisitorBase}.
633 static int GetStaticVisitorIdForMap(Map* map); 633 static int GetStaticVisitorIdForMap(Map* map);
634 634
635 // We cannot avoid stale handles to left-trimmed objects, but can only make
636 // sure all handles still needed are updated. Filter out a stale pointer
637 // and clear the slot to allow post processing of handles (needed because
638 // the sweeper might actually free the underlying page).
639 inline bool PurgeLeftTrimmedObject(Object** object);
640
641 // Notifies the heap that is ok to start marking or other activities that 635 // Notifies the heap that is ok to start marking or other activities that
642 // should not happen during deserialization. 636 // should not happen during deserialization.
643 void NotifyDeserializationComplete(); 637 void NotifyDeserializationComplete();
644 638
645 intptr_t old_generation_allocation_limit() const { 639 intptr_t old_generation_allocation_limit() const {
646 return old_generation_allocation_limit_; 640 return old_generation_allocation_limit_;
647 } 641 }
648 642
649 bool always_allocate() { return always_allocate_scope_count_.Value() != 0; } 643 bool always_allocate() { return always_allocate_scope_count_.Value() != 0; }
650 644
(...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
2698 friend class LargeObjectSpace; 2692 friend class LargeObjectSpace;
2699 friend class NewSpace; 2693 friend class NewSpace;
2700 friend class PagedSpace; 2694 friend class PagedSpace;
2701 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2695 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2702 }; 2696 };
2703 2697
2704 } // namespace internal 2698 } // namespace internal
2705 } // namespace v8 2699 } // namespace v8
2706 2700
2707 #endif // V8_HEAP_HEAP_H_ 2701 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698