Commit 6975f77b authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Remove dead code in map space class.

BUG=

Review URL: https://codereview.chromium.org/1780663002

Cr-Commit-Position: refs/heads/master@{#34619}
parent b29846c2
...@@ -106,10 +106,6 @@ class Space; ...@@ -106,10 +106,6 @@ class Space;
#define DCHECK_PAGE_OFFSET(offset) \ #define DCHECK_PAGE_OFFSET(offset) \
DCHECK((Page::kObjectStartOffset <= offset) && (offset <= Page::kPageSize)) DCHECK((Page::kObjectStartOffset <= offset) && (offset <= Page::kPageSize))
#define DCHECK_MAP_PAGE_INDEX(index) \
DCHECK((0 <= index) && (index <= MapSpace::kMaxMapPageIndex))
class MarkBit { class MarkBit {
public: public:
typedef uint32_t CellType; typedef uint32_t CellType;
...@@ -2879,12 +2875,7 @@ class MapSpace : public PagedSpace { ...@@ -2879,12 +2875,7 @@ class MapSpace : public PagedSpace {
public: public:
// Creates a map space object. // Creates a map space object.
MapSpace(Heap* heap, AllocationSpace id) MapSpace(Heap* heap, AllocationSpace id)
: PagedSpace(heap, id, NOT_EXECUTABLE), : PagedSpace(heap, id, NOT_EXECUTABLE) {}
max_map_space_pages_(kMaxMapPageIndex - 1) {}
// Given an index, returns the page address.
// TODO(1600): this limit is artifical just to keep code compilable
static const int kMaxMapPageIndex = 1 << 16;
int RoundSizeDownToObjectAlignment(int size) override { int RoundSizeDownToObjectAlignment(int size) override {
if (base::bits::IsPowerOfTwo32(Map::kSize)) { if (base::bits::IsPowerOfTwo32(Map::kSize)) {
...@@ -2897,16 +2888,6 @@ class MapSpace : public PagedSpace { ...@@ -2897,16 +2888,6 @@ class MapSpace : public PagedSpace {
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
void VerifyObject(HeapObject* obj) override; void VerifyObject(HeapObject* obj) override;
#endif #endif
private:
static const int kMapsPerPage = Page::kAllocatableMemory / Map::kSize;
// Do map space compaction if there is a page gap.
int CompactionThreshold() {
return kMapsPerPage * (max_map_space_pages_ - 1);
}
const int max_map_space_pages_;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment