Chromium Code Reviews| Index: src/heap/heap.h |
| diff --git a/src/heap/heap.h b/src/heap/heap.h |
| index 7a17abbe371cc8700e45fb40732185f6c3afb822..ee4dd0ff8e06d84a4a919063b0e6890b7755cf19 100644 |
| --- a/src/heap/heap.h |
| +++ b/src/heap/heap.h |
| @@ -641,8 +641,7 @@ class Heap { |
| Address NewSpaceTop() { return new_space_.top(); } |
| NewSpace* new_space() { return &new_space_; } |
| - OldSpace* old_pointer_space() { return old_pointer_space_; } |
| - OldSpace* old_data_space() { return old_data_space_; } |
| + OldSpace* old_space() { return old_space_; } |
| OldSpace* code_space() { return code_space_; } |
| MapSpace* map_space() { return map_space_; } |
| CellSpace* cell_space() { return cell_space_; } |
| @@ -650,10 +649,8 @@ class Heap { |
| LargeObjectSpace* lo_space() { return lo_space_; } |
| PagedSpace* paged_space(int idx) { |
| switch (idx) { |
| - case OLD_POINTER_SPACE: |
| - return old_pointer_space(); |
| - case OLD_DATA_SPACE: |
| - return old_data_space(); |
| + case OLD_SPACE: |
| + return old_space(); |
| case MAP_SPACE: |
| return map_space(); |
| case CELL_SPACE: |
| @@ -681,18 +678,11 @@ class Heap { |
| return new_space_.allocation_limit_address(); |
| } |
| - Address* OldPointerSpaceAllocationTopAddress() { |
| - return old_pointer_space_->allocation_top_address(); |
| + Address* OldSpaceAllocationTopAddress() { |
| + return old_space_->allocation_top_address(); |
| } |
| - Address* OldPointerSpaceAllocationLimitAddress() { |
| - return old_pointer_space_->allocation_limit_address(); |
| - } |
| - |
| - Address* OldDataSpaceAllocationTopAddress() { |
| - return old_data_space_->allocation_top_address(); |
| - } |
| - Address* OldDataSpaceAllocationLimitAddress() { |
| - return old_data_space_->allocation_limit_address(); |
| + Address* OldSpaceAllocationLimitAddress() { |
| + return old_space_->allocation_limit_address(); |
| } |
| // TODO(hpayer): There is still a missmatch between capacity and actual |
| @@ -922,13 +912,9 @@ class Heap { |
| inline bool InFromSpace(Object* object); |
| inline bool InToSpace(Object* object); |
| - // Returns whether the object resides in old pointer space. |
| - inline bool InOldPointerSpace(Address address); |
| - inline bool InOldPointerSpace(Object* object); |
| - |
| - // Returns whether the object resides in old data space. |
| - inline bool InOldDataSpace(Address address); |
| - inline bool InOldDataSpace(Object* object); |
| + // Returns whether the object resides in old space. |
| + inline bool InOldSpace(Address address); |
| + inline bool InOldSpace(Object* object); |
| // Checks whether an address/object in the heap (including auxiliary |
| // area and unused area). |
| @@ -940,10 +926,6 @@ class Heap { |
| bool InSpace(Address addr, AllocationSpace space); |
| bool InSpace(HeapObject* value, AllocationSpace space); |
| - // Finds out which space an object should get promoted to based on its type. |
| - inline OldSpace* TargetSpace(HeapObject* object); |
| - static inline AllocationSpace TargetSpaceId(InstanceType type); |
| - |
| // Checks whether the given object is allowed to be migrated from it's |
| // current space into the given destination space. Used for debugging. |
| inline bool AllowedToBeMigrated(HeapObject* object, AllocationSpace dest); |
| @@ -1580,8 +1562,7 @@ class Heap { |
| int scan_on_scavenge_pages_; |
| NewSpace new_space_; |
| - OldSpace* old_pointer_space_; |
| - OldSpace* old_data_space_; |
| + OldSpace* old_space_; |
| OldSpace* code_space_; |
| MapSpace* map_space_; |
| CellSpace* cell_space_; |
| @@ -1777,14 +1758,11 @@ class Heap { |
| inline void UpdateOldSpaceLimits(); |
| // Selects the proper allocation space depending on the given object |
| - // size, pretenuring decision, and preferred old-space. |
| + // size and pretenuring decision. |
| static AllocationSpace SelectSpace(int object_size, |
|
Hannes Payer (out of office)
2015/03/18 07:33:49
I think we can get rid of SelectSpace and integrat
|
| - AllocationSpace preferred_old_space, |
| PretenureFlag pretenure) { |
| - DCHECK(preferred_old_space == OLD_POINTER_SPACE || |
| - preferred_old_space == OLD_DATA_SPACE); |
| if (object_size > Page::kMaxRegularHeapObjectSize) return LO_SPACE; |
| - return (pretenure == TENURED) ? preferred_old_space : NEW_SPACE; |
| + return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE; |
| } |
| HeapObject* DoubleAlignForDeserialization(HeapObject* object, int size); |
| @@ -2187,30 +2165,28 @@ class HeapStats { |
| int* start_marker; // 0 |
| int* new_space_size; // 1 |
| int* new_space_capacity; // 2 |
| - intptr_t* old_pointer_space_size; // 3 |
| - intptr_t* old_pointer_space_capacity; // 4 |
| - intptr_t* old_data_space_size; // 5 |
| - intptr_t* old_data_space_capacity; // 6 |
| - intptr_t* code_space_size; // 7 |
| - intptr_t* code_space_capacity; // 8 |
| - intptr_t* map_space_size; // 9 |
| - intptr_t* map_space_capacity; // 10 |
| - intptr_t* cell_space_size; // 11 |
| - intptr_t* cell_space_capacity; // 12 |
| - intptr_t* lo_space_size; // 13 |
| - int* global_handle_count; // 14 |
| - int* weak_global_handle_count; // 15 |
| - int* pending_global_handle_count; // 16 |
| - int* near_death_global_handle_count; // 17 |
| - int* free_global_handle_count; // 18 |
| - intptr_t* memory_allocator_size; // 19 |
| - intptr_t* memory_allocator_capacity; // 20 |
| - int* objects_per_type; // 21 |
| - int* size_per_type; // 22 |
| - int* os_error; // 23 |
| - int* end_marker; // 24 |
| - intptr_t* property_cell_space_size; // 25 |
| - intptr_t* property_cell_space_capacity; // 26 |
| + intptr_t* old_space_size; // 3 |
| + intptr_t* old_space_capacity; // 4 |
| + intptr_t* code_space_size; // 5 |
| + intptr_t* code_space_capacity; // 6 |
| + intptr_t* map_space_size; // 7 |
| + intptr_t* map_space_capacity; // 8 |
| + intptr_t* cell_space_size; // 9 |
| + intptr_t* cell_space_capacity; // 10 |
| + intptr_t* lo_space_size; // 11 |
| + int* global_handle_count; // 12 |
| + int* weak_global_handle_count; // 13 |
| + int* pending_global_handle_count; // 14 |
| + int* near_death_global_handle_count; // 15 |
| + int* free_global_handle_count; // 16 |
| + intptr_t* memory_allocator_size; // 17 |
| + intptr_t* memory_allocator_capacity; // 18 |
| + int* objects_per_type; // 19 |
| + int* size_per_type; // 20 |
| + int* os_error; // 21 |
| + int* end_marker; // 22 |
| + intptr_t* property_cell_space_size; // 23 |
| + intptr_t* property_cell_space_capacity; // 24 |
| }; |
| @@ -2269,12 +2245,11 @@ class AllSpaces BASE_EMBEDDED { |
| }; |
| -// Space iterator for iterating over all old spaces of the heap: Old pointer |
| -// space, old data space and code space. Returns each space in turn, and null |
| -// when it is done. |
| +// Space iterator for iterating over all old spaces of the heap: Old space |
| +// and code space. Returns each space in turn, and null when it is done. |
| class OldSpaces BASE_EMBEDDED { |
| public: |
| - explicit OldSpaces(Heap* heap) : heap_(heap), counter_(OLD_POINTER_SPACE) {} |
| + explicit OldSpaces(Heap* heap) : heap_(heap), counter_(OLD_SPACE) {} |
| OldSpace* next(); |
| private: |
| @@ -2284,11 +2259,11 @@ class OldSpaces BASE_EMBEDDED { |
| // Space iterator for iterating over all the paged spaces of the heap: Map |
| -// space, old pointer space, old data space, code space and cell space. Returns |
| +// space, old space, code space and cell space. Returns |
| // each space in turn, and null when it is done. |
| class PagedSpaces BASE_EMBEDDED { |
| public: |
| - explicit PagedSpaces(Heap* heap) : heap_(heap), counter_(OLD_POINTER_SPACE) {} |
| + explicit PagedSpaces(Heap* heap) : heap_(heap), counter_(OLD_SPACE) {} |
| PagedSpace* next(); |
| private: |