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

Side by Side Diff: src/heap/heap.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/external-reference-table.cc ('k') | src/heap/spaces.h » ('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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 // Destroys all memory allocated by the heap. 870 // Destroys all memory allocated by the heap.
871 void TearDown(); 871 void TearDown();
872 872
873 // Returns whether SetUp has been called. 873 // Returns whether SetUp has been called.
874 bool HasBeenSetUp(); 874 bool HasBeenSetUp();
875 875
876 // =========================================================================== 876 // ===========================================================================
877 // Getters for spaces. ======================================================= 877 // Getters for spaces. =======================================================
878 // =========================================================================== 878 // ===========================================================================
879 879
880 // Return the starting address and a mask for the new space. And-masking an
881 // address with the mask will result in the start address of the new space
882 // for all addresses in either semispace.
883 Address NewSpaceStart() { return new_space_.start(); }
884 Address NewSpaceTop() { return new_space_.top(); } 880 Address NewSpaceTop() { return new_space_.top(); }
885 881
886 NewSpace* new_space() { return &new_space_; } 882 NewSpace* new_space() { return &new_space_; }
887 OldSpace* old_space() { return old_space_; } 883 OldSpace* old_space() { return old_space_; }
888 OldSpace* code_space() { return code_space_; } 884 OldSpace* code_space() { return code_space_; }
889 MapSpace* map_space() { return map_space_; } 885 MapSpace* map_space() { return map_space_; }
890 LargeObjectSpace* lo_space() { return lo_space_; } 886 LargeObjectSpace* lo_space() { return lo_space_; }
891 887
892 PagedSpace* paged_space(int idx) { 888 PagedSpace* paged_space(int idx) {
893 switch (idx) { 889 switch (idx) {
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 friend class LargeObjectSpace; 2650 friend class LargeObjectSpace;
2655 friend class NewSpace; 2651 friend class NewSpace;
2656 friend class PagedSpace; 2652 friend class PagedSpace;
2657 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2653 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2658 }; 2654 };
2659 2655
2660 } // namespace internal 2656 } // namespace internal
2661 } // namespace v8 2657 } // namespace v8
2662 2658
2663 #endif // V8_HEAP_HEAP_H_ 2659 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/external-reference-table.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698