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

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

Issue 1845463003: Remove usages of Heap::NewSpaceStart and its external reference (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Only use 1 constant, reordered checks a bit to have earlier bail outs for old space Created 4 years, 8 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/heap.h ('k') | src/heap/spaces.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_SPACES_H_ 5 #ifndef V8_HEAP_SPACES_H_
6 #define V8_HEAP_SPACES_H_ 6 #define V8_HEAP_SPACES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/atomic-utils.h" 9 #include "src/atomic-utils.h"
10 #include "src/base/atomicops.h" 10 #include "src/base/atomicops.h"
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 } 2684 }
2685 2685
2686 // Return the address of the first object in the active semispace. 2686 // Return the address of the first object in the active semispace.
2687 Address bottom() { return to_space_.space_start(); } 2687 Address bottom() { return to_space_.space_start(); }
2688 2688
2689 // Get the age mark of the inactive semispace. 2689 // Get the age mark of the inactive semispace.
2690 Address age_mark() { return from_space_.age_mark(); } 2690 Address age_mark() { return from_space_.age_mark(); }
2691 // Set the age mark in the active semispace. 2691 // Set the age mark in the active semispace.
2692 void set_age_mark(Address mark) { to_space_.set_age_mark(mark); } 2692 void set_age_mark(Address mark) { to_space_.set_age_mark(mark); }
2693 2693
2694 // The start address of the space and a bit mask. Anding an address in the
2695 // new space with the mask will result in the start address.
2696 Address start() { return start_; }
2697
2698 // The allocation top and limit address. 2694 // The allocation top and limit address.
2699 Address* allocation_top_address() { return allocation_info_.top_address(); } 2695 Address* allocation_top_address() { return allocation_info_.top_address(); }
2700 2696
2701 // The allocation limit address. 2697 // The allocation limit address.
2702 Address* allocation_limit_address() { 2698 Address* allocation_limit_address() {
2703 return allocation_info_.limit_address(); 2699 return allocation_info_.limit_address();
2704 } 2700 }
2705 2701
2706 MUST_USE_RESULT INLINE(AllocationResult AllocateRawAligned( 2702 MUST_USE_RESULT INLINE(AllocationResult AllocateRawAligned(
2707 int size_in_bytes, AllocationAlignment alignment)); 2703 int size_in_bytes, AllocationAlignment alignment));
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2811 2807
2812 Address chunk_base_; 2808 Address chunk_base_;
2813 uintptr_t chunk_size_; 2809 uintptr_t chunk_size_;
2814 2810
2815 // The semispaces. 2811 // The semispaces.
2816 SemiSpace to_space_; 2812 SemiSpace to_space_;
2817 SemiSpace from_space_; 2813 SemiSpace from_space_;
2818 base::VirtualMemory reservation_; 2814 base::VirtualMemory reservation_;
2819 int pages_used_; 2815 int pages_used_;
2820 2816
2821 // Start address and bit mask for containment testing.
2822 Address start_;
2823
2824 // Allocation pointer and limit for normal allocation and allocation during 2817 // Allocation pointer and limit for normal allocation and allocation during
2825 // mark-compact collection. 2818 // mark-compact collection.
2826 AllocationInfo allocation_info_; 2819 AllocationInfo allocation_info_;
2827 2820
2828 Address top_on_previous_step_; 2821 Address top_on_previous_step_;
2829 2822
2830 HistogramInfo* allocated_histogram_; 2823 HistogramInfo* allocated_histogram_;
2831 HistogramInfo* promoted_histogram_; 2824 HistogramInfo* promoted_histogram_;
2832 2825
2833 bool EnsureAllocation(int size_in_bytes, AllocationAlignment alignment); 2826 bool EnsureAllocation(int size_in_bytes, AllocationAlignment alignment);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
3092 count = 0; 3085 count = 0;
3093 } 3086 }
3094 // Must be small, since an iteration is used for lookup. 3087 // Must be small, since an iteration is used for lookup.
3095 static const int kMaxComments = 64; 3088 static const int kMaxComments = 64;
3096 }; 3089 };
3097 #endif 3090 #endif
3098 } // namespace internal 3091 } // namespace internal
3099 } // namespace v8 3092 } // namespace v8
3100 3093
3101 #endif // V8_HEAP_SPACES_H_ 3094 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698