| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 375 |
| 376 void Page::MarkEvacuationCandidate() { | 376 void Page::MarkEvacuationCandidate() { |
| 377 DCHECK(!IsFlagSet(NEVER_EVACUATE)); | 377 DCHECK(!IsFlagSet(NEVER_EVACUATE)); |
| 378 DCHECK_NULL(old_to_old_slots_); | 378 DCHECK_NULL(old_to_old_slots_); |
| 379 DCHECK_NULL(typed_old_to_old_slots_); | 379 DCHECK_NULL(typed_old_to_old_slots_); |
| 380 SetFlag(EVACUATION_CANDIDATE); | 380 SetFlag(EVACUATION_CANDIDATE); |
| 381 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this); | 381 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this); |
| 382 } | 382 } |
| 383 | 383 |
| 384 void Page::ClearEvacuationCandidate() { | 384 void Page::ClearEvacuationCandidate() { |
| 385 if (!IsFlagSet(COMPACTION_WAS_ABORTED)) { | 385 DCHECK_NULL(old_to_old_slots_); |
| 386 DCHECK_NULL(old_to_old_slots_); | 386 DCHECK_NULL(typed_old_to_old_slots_); |
| 387 DCHECK_NULL(typed_old_to_old_slots_); | |
| 388 } | |
| 389 ClearFlag(EVACUATION_CANDIDATE); | 387 ClearFlag(EVACUATION_CANDIDATE); |
| 390 InitializeFreeListCategories(); | 388 InitializeFreeListCategories(); |
| 391 } | 389 } |
| 392 | 390 |
| 393 MemoryChunkIterator::MemoryChunkIterator(Heap* heap, Mode mode) | 391 MemoryChunkIterator::MemoryChunkIterator(Heap* heap, Mode mode) |
| 394 : state_(kOldSpaceState), | 392 : state_(kOldSpaceState), |
| 395 mode_(mode), | 393 mode_(mode), |
| 396 old_iterator_(heap->old_space()), | 394 old_iterator_(heap->old_space()), |
| 397 code_iterator_(heap->code_space()), | 395 code_iterator_(heap->code_space()), |
| 398 map_iterator_(heap->map_space()), | 396 map_iterator_(heap->map_space()), |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 other->allocation_info_.Reset(nullptr, nullptr); | 708 other->allocation_info_.Reset(nullptr, nullptr); |
| 711 return true; | 709 return true; |
| 712 } | 710 } |
| 713 return false; | 711 return false; |
| 714 } | 712 } |
| 715 | 713 |
| 716 } // namespace internal | 714 } // namespace internal |
| 717 } // namespace v8 | 715 } // namespace v8 |
| 718 | 716 |
| 719 #endif // V8_HEAP_SPACES_INL_H_ | 717 #endif // V8_HEAP_SPACES_INL_H_ |
| OLD | NEW |