OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_SPACES_INL_H_ | 5 #ifndef V8_HEAP_SPACES_INL_H_ |
6 #define V8_HEAP_SPACES_INL_H_ | 6 #define V8_HEAP_SPACES_INL_H_ |
7 | 7 |
8 #include "src/heap/incremental-marking.h" | 8 #include "src/heap/incremental-marking.h" |
9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 void Page::MarkNeverAllocateForTesting() { | 324 void Page::MarkNeverAllocateForTesting() { |
325 DCHECK(this->owner()->identity() != NEW_SPACE); | 325 DCHECK(this->owner()->identity() != NEW_SPACE); |
326 DCHECK(!IsFlagSet(NEVER_ALLOCATE_ON_PAGE)); | 326 DCHECK(!IsFlagSet(NEVER_ALLOCATE_ON_PAGE)); |
327 SetFlag(NEVER_ALLOCATE_ON_PAGE); | 327 SetFlag(NEVER_ALLOCATE_ON_PAGE); |
328 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this); | 328 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this); |
329 } | 329 } |
330 | 330 |
331 void Page::MarkEvacuationCandidate() { | 331 void Page::MarkEvacuationCandidate() { |
332 DCHECK(!IsFlagSet(NEVER_EVACUATE)); | 332 DCHECK(!IsFlagSet(NEVER_EVACUATE)); |
333 DCHECK_NULL(slot_set<OLD_TO_OLD>()); | 333 DCHECK_NULL(old_to_old_slots_); |
334 DCHECK_NULL(typed_slot_set<OLD_TO_OLD>()); | 334 DCHECK_NULL(typed_old_to_old_slots_); |
335 SetFlag(EVACUATION_CANDIDATE); | 335 SetFlag(EVACUATION_CANDIDATE); |
336 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this); | 336 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this); |
337 } | 337 } |
338 | 338 |
339 void Page::ClearEvacuationCandidate() { | 339 void Page::ClearEvacuationCandidate() { |
340 if (!IsFlagSet(COMPACTION_WAS_ABORTED)) { | 340 if (!IsFlagSet(COMPACTION_WAS_ABORTED)) { |
341 DCHECK_NULL(slot_set<OLD_TO_OLD>()); | 341 DCHECK_NULL(old_to_old_slots_); |
342 DCHECK_NULL(typed_slot_set<OLD_TO_OLD>()); | 342 DCHECK_NULL(typed_old_to_old_slots_); |
343 } | 343 } |
344 ClearFlag(EVACUATION_CANDIDATE); | 344 ClearFlag(EVACUATION_CANDIDATE); |
345 InitializeFreeListCategories(); | 345 InitializeFreeListCategories(); |
346 } | 346 } |
347 | 347 |
348 MemoryChunkIterator::MemoryChunkIterator(Heap* heap) | 348 MemoryChunkIterator::MemoryChunkIterator(Heap* heap) |
349 : heap_(heap), | 349 : heap_(heap), |
350 state_(kOldSpaceState), | 350 state_(kOldSpaceState), |
351 old_iterator_(heap->old_space()->begin()), | 351 old_iterator_(heap->old_space()->begin()), |
352 code_iterator_(heap->code_space()->begin()), | 352 code_iterator_(heap->code_space()->begin()), |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 other->allocation_info_.Reset(nullptr, nullptr); | 669 other->allocation_info_.Reset(nullptr, nullptr); |
670 return true; | 670 return true; |
671 } | 671 } |
672 return false; | 672 return false; |
673 } | 673 } |
674 | 674 |
675 } // namespace internal | 675 } // namespace internal |
676 } // namespace v8 | 676 } // namespace v8 |
677 | 677 |
678 #endif // V8_HEAP_SPACES_INL_H_ | 678 #endif // V8_HEAP_SPACES_INL_H_ |
OLD | NEW |