Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(620)

Side by Side Diff: src/heap/spaces-inl.h

Issue 2796233003: [heap] Evacuation for young generation (Closed)
Patch Set: Disable flag Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/spaces.cc ('k') | test/cctest/heap/test-page-promotion.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 case kFinishedState: 331 case kFinishedState:
332 return nullptr; 332 return nullptr;
333 default: 333 default:
334 break; 334 break;
335 } 335 }
336 UNREACHABLE(); 336 UNREACHABLE();
337 return nullptr; 337 return nullptr;
338 } 338 }
339 339
340 Page* FreeListCategory::page() { 340 Page* FreeListCategory::page() const {
341 return Page::FromAddress(reinterpret_cast<Address>(this)); 341 return Page::FromAddress(
342 reinterpret_cast<Address>(const_cast<FreeListCategory*>(this)));
343 }
344
345 Page* FreeList::GetPageForCategoryType(FreeListCategoryType type) {
346 return top(type) ? top(type)->page() : nullptr;
342 } 347 }
343 348
344 FreeList* FreeListCategory::owner() { 349 FreeList* FreeListCategory::owner() {
345 return reinterpret_cast<PagedSpace*>( 350 return reinterpret_cast<PagedSpace*>(
346 Page::FromAddress(reinterpret_cast<Address>(this))->owner()) 351 Page::FromAddress(reinterpret_cast<Address>(this))->owner())
347 ->free_list(); 352 ->free_list();
348 } 353 }
349 354
350 bool FreeListCategory::is_linked() { 355 bool FreeListCategory::is_linked() {
351 return prev_ != nullptr || next_ != nullptr || owner()->top(type_) == this; 356 return prev_ != nullptr || next_ != nullptr || owner()->top(type_) == this;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 other->allocation_info_.Reset(nullptr, nullptr); 626 other->allocation_info_.Reset(nullptr, nullptr);
622 return true; 627 return true;
623 } 628 }
624 return false; 629 return false;
625 } 630 }
626 631
627 } // namespace internal 632 } // namespace internal
628 } // namespace v8 633 } // namespace v8
629 634
630 #endif // V8_HEAP_SPACES_INL_H_ 635 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | test/cctest/heap/test-page-promotion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698