| Index: src/spaces.h
|
| diff --git a/src/spaces.h b/src/spaces.h
|
| index e7e4d529fcbe5a82b5dbb79a606d904339dc5d5e..5b27542c3c30945229e71e7b1285f00d6f2550b6 100644
|
| --- a/src/spaces.h
|
| +++ b/src/spaces.h
|
| @@ -1454,6 +1454,7 @@ class FreeListCategory {
|
| void Free(FreeListNode* node, int size_in_bytes);
|
|
|
| FreeListNode* PickNodeFromList(int *node_size);
|
| + FreeListNode* PickNodeFromList(int size_in_bytes, int *node_size);
|
|
|
| intptr_t EvictFreeListItemsInList(Page* p);
|
|
|
| @@ -2626,20 +2627,20 @@ class MapSpace : public FixedSpace {
|
|
|
|
|
| // -----------------------------------------------------------------------------
|
| -// Old space for all global object property cell objects
|
| +// Old space for simple property cell objects
|
|
|
| class CellSpace : public FixedSpace {
|
| 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, JSGlobalPropertyCell::kSize)
|
| + : FixedSpace(heap, max_capacity, id, Cell::kSize)
|
| {}
|
|
|
| virtual int RoundSizeDownToObjectAlignment(int size) {
|
| - if (IsPowerOf2(JSGlobalPropertyCell::kSize)) {
|
| - return RoundDown(size, JSGlobalPropertyCell::kSize);
|
| + if (IsPowerOf2(Cell::kSize)) {
|
| + return RoundDown(size, Cell::kSize);
|
| } else {
|
| - return (size / JSGlobalPropertyCell::kSize) * JSGlobalPropertyCell::kSize;
|
| + return (size / Cell::kSize) * Cell::kSize;
|
| }
|
| }
|
|
|
| @@ -2652,6 +2653,33 @@ class CellSpace : public FixedSpace {
|
|
|
|
|
| // -----------------------------------------------------------------------------
|
| +// Old space for all global object property cell objects
|
| +
|
| +class PropertyCellSpace : public FixedSpace {
|
| + 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)
|
| + {}
|
| +
|
| + virtual int RoundSizeDownToObjectAlignment(int size) {
|
| + if (IsPowerOf2(PropertyCell::kSize)) {
|
| + return RoundDown(size, PropertyCell::kSize);
|
| + } else {
|
| + return (size / PropertyCell::kSize) * PropertyCell::kSize;
|
| + }
|
| + }
|
| +
|
| + protected:
|
| + virtual void VerifyObject(HeapObject* obj);
|
| +
|
| + public:
|
| + TRACK_MEMORY("PropertyCellSpace")
|
| +};
|
| +
|
| +
|
| +// -----------------------------------------------------------------------------
|
| // Large objects ( > Page::kMaxHeapObjectSize ) are allocated and managed by
|
| // the large object space. A large object is allocated from OS heap with
|
| // extra padding bytes (Page::kPageSize + Page::kObjectStartOffset).
|
|
|