| 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 DCHECK_NULL(old_to_old_slots_); | 385 if (!IsFlagSet(COMPACTION_WAS_ABORTED)) { |
| 386 DCHECK_NULL(typed_old_to_old_slots_); | 386 DCHECK_NULL(old_to_old_slots_); |
| 387 DCHECK_NULL(typed_old_to_old_slots_); |
| 388 } |
| 387 ClearFlag(EVACUATION_CANDIDATE); | 389 ClearFlag(EVACUATION_CANDIDATE); |
| 388 InitializeFreeListCategories(); | 390 InitializeFreeListCategories(); |
| 389 } | 391 } |
| 390 | 392 |
| 391 MemoryChunkIterator::MemoryChunkIterator(Heap* heap, Mode mode) | 393 MemoryChunkIterator::MemoryChunkIterator(Heap* heap, Mode mode) |
| 392 : state_(kOldSpaceState), | 394 : state_(kOldSpaceState), |
| 393 mode_(mode), | 395 mode_(mode), |
| 394 old_iterator_(heap->old_space()), | 396 old_iterator_(heap->old_space()), |
| 395 code_iterator_(heap->code_space()), | 397 code_iterator_(heap->code_space()), |
| 396 map_iterator_(heap->map_space()), | 398 map_iterator_(heap->map_space()), |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 other->allocation_info_.Reset(nullptr, nullptr); | 710 other->allocation_info_.Reset(nullptr, nullptr); |
| 709 return true; | 711 return true; |
| 710 } | 712 } |
| 711 return false; | 713 return false; |
| 712 } | 714 } |
| 713 | 715 |
| 714 } // namespace internal | 716 } // namespace internal |
| 715 } // namespace v8 | 717 } // namespace v8 |
| 716 | 718 |
| 717 #endif // V8_HEAP_SPACES_INL_H_ | 719 #endif // V8_HEAP_SPACES_INL_H_ |
| OLD | NEW |