| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 205 } |
| 206 | 206 |
| 207 return page; | 207 return page; |
| 208 } | 208 } |
| 209 | 209 |
| 210 Page* Page::ConvertNewToOld(Page* old_page) { | 210 Page* Page::ConvertNewToOld(Page* old_page) { |
| 211 DCHECK(!old_page->is_anchor()); | 211 DCHECK(!old_page->is_anchor()); |
| 212 DCHECK(old_page->InNewSpace()); | 212 DCHECK(old_page->InNewSpace()); |
| 213 OldSpace* old_space = old_page->heap()->old_space(); | 213 OldSpace* old_space = old_page->heap()->old_space(); |
| 214 old_page->set_owner(old_space); | 214 old_page->set_owner(old_space); |
| 215 old_page->SetFlags(0, ~0); | 215 old_page->SetFlags(0, static_cast<uintptr_t>(~0)); |
| 216 old_space->AccountCommitted(old_page->size()); | 216 old_space->AccountCommitted(old_page->size()); |
| 217 Page* new_page = Page::Initialize<kDoNotFreeMemory>( | 217 Page* new_page = Page::Initialize<kDoNotFreeMemory>( |
| 218 old_page->heap(), old_page, NOT_EXECUTABLE, old_space); | 218 old_page->heap(), old_page, NOT_EXECUTABLE, old_space); |
| 219 new_page->InsertAfter(old_space->anchor()->prev_page()); | 219 new_page->InsertAfter(old_space->anchor()->prev_page()); |
| 220 return new_page; | 220 return new_page; |
| 221 } | 221 } |
| 222 | 222 |
| 223 void Page::InitializeFreeListCategories() { | 223 void Page::InitializeFreeListCategories() { |
| 224 for (int i = kFirstCategory; i < kNumberOfCategories; i++) { | 224 for (int i = kFirstCategory; i < kNumberOfCategories; i++) { |
| 225 categories_[i].Initialize(static_cast<FreeListCategoryType>(i)); | 225 categories_[i].Initialize(static_cast<FreeListCategoryType>(i)); |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 other->allocation_info_.Reset(nullptr, nullptr); | 665 other->allocation_info_.Reset(nullptr, nullptr); |
| 666 return true; | 666 return true; |
| 667 } | 667 } |
| 668 return false; | 668 return false; |
| 669 } | 669 } |
| 670 | 670 |
| 671 } // namespace internal | 671 } // namespace internal |
| 672 } // namespace v8 | 672 } // namespace v8 |
| 673 | 673 |
| 674 #endif // V8_HEAP_SPACES_INL_H_ | 674 #endif // V8_HEAP_SPACES_INL_H_ |
| OLD | NEW |