Remove dead FixedSpace class from the spaces hierarchy.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 33f6db6a
......@@ -2807,23 +2807,6 @@ void PagedSpace::ReportStatistics() {
}
#endif
// -----------------------------------------------------------------------------
// FixedSpace implementation
void FixedSpace::PrepareForMarkCompact() {
// Call prepare of the super class.
PagedSpace::PrepareForMarkCompact();
// During a non-compacting collection, everything below the linear
// allocation pointer except wasted top-of-page blocks is considered
// allocated and we will rediscover available bytes during the
// collection.
accounting_stats_.AllocateBytes(free_list_.available());
// Clear the free list before a full GC---it will be rebuilt afterward.
free_list_.Reset();
}
// -----------------------------------------------------------------------------
// MapSpace implementation
......
......@@ -1683,10 +1683,10 @@ class PagedSpace : public Space {
// During boot the free_space_map is created, and afterwards we may need
// to write it into the free list nodes that were already created.
virtual void RepairFreeListsAfterBoot();
void RepairFreeListsAfterBoot();
// Prepares for a mark-compact GC.
virtual void PrepareForMarkCompact();
void PrepareForMarkCompact();
// Current capacity without growing (Size() + Available()).
intptr_t Capacity() { return accounting_stats_.Capacity(); }
......@@ -1912,12 +1912,6 @@ class PagedSpace : public Space {
// Normal allocation information.
AllocationInfo allocation_info_;
// Bytes of each page that cannot be allocated. Possibly non-zero
// for pages in spaces with only fixed-size objects. Always zero
// for pages in spaces with variable sized objects (those pages are
// padded with free-list nodes).
int page_extra_;
bool was_swept_conservatively_;
// The first page to be swept when the lazy sweeper advances. Is set
......@@ -2623,12 +2617,6 @@ class OldSpace : public PagedSpace {
AllocationSpace id,
Executability executable)
: PagedSpace(heap, max_capacity, id, executable) {
page_extra_ = 0;
}
// The limit of allocation for a page in this space.
virtual Address PageAllocationLimit(Page* page) {
return page->area_end();
}
public:
......@@ -2644,44 +2632,14 @@ class OldSpace : public PagedSpace {
&& (info).limit() <= (space).page_high())
// -----------------------------------------------------------------------------
// Old space for objects of a fixed size
class FixedSpace : public PagedSpace {
public:
FixedSpace(Heap* heap,
intptr_t max_capacity,
AllocationSpace id,
int object_size_in_bytes)
: PagedSpace(heap, max_capacity, id, NOT_EXECUTABLE),
object_size_in_bytes_(object_size_in_bytes) {
page_extra_ = Page::kNonCodeObjectAreaSize % object_size_in_bytes;
}
// The limit of allocation for a page in this space.
virtual Address PageAllocationLimit(Page* page) {
return page->area_end() - page_extra_;
}
int object_size_in_bytes() { return object_size_in_bytes_; }
// Prepares for a mark-compact GC.
virtual void PrepareForMarkCompact();
private:
// The size of objects in this space.
int object_size_in_bytes_;
};
// -----------------------------------------------------------------------------
// Old space for all map objects
class MapSpace : public FixedSpace {
class MapSpace : public PagedSpace {
public:
// Creates a map space object with a maximum capacity.
MapSpace(Heap* heap, intptr_t max_capacity, AllocationSpace id)
: FixedSpace(heap, max_capacity, id, Map::kSize),
: PagedSpace(heap, max_capacity, id, NOT_EXECUTABLE),
max_map_space_pages_(kMaxMapPageIndex - 1) {
}
......@@ -2718,12 +2676,12 @@ class MapSpace : public FixedSpace {
// -----------------------------------------------------------------------------
// Old space for simple property cell objects
class CellSpace : public FixedSpace {
class CellSpace : public PagedSpace {
public:
// Creates a property cell space object with a maximum capacity.
CellSpace(Heap* heap, intptr_t max_capacity, AllocationSpace id)
: FixedSpace(heap, max_capacity, id, Cell::kSize)
{}
: PagedSpace(heap, max_capacity, id, NOT_EXECUTABLE) {
}
virtual int RoundSizeDownToObjectAlignment(int size) {
if (IsPowerOf2(Cell::kSize)) {
......@@ -2744,13 +2702,13 @@ class CellSpace : public FixedSpace {
// -----------------------------------------------------------------------------
// Old space for all global object property cell objects
class PropertyCellSpace : public FixedSpace {
class PropertyCellSpace : public PagedSpace {
public:
// Creates a property cell space object with a maximum capacity.
PropertyCellSpace(Heap* heap, intptr_t max_capacity,
AllocationSpace id)
: FixedSpace(heap, max_capacity, id, PropertyCell::kSize)
{}
: PagedSpace(heap, max_capacity, id, NOT_EXECUTABLE) {
}
virtual int RoundSizeDownToObjectAlignment(int size) {
if (IsPowerOf2(PropertyCell::kSize)) {
......
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