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

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

Issue 1999753002: [heap] Harden heap-related cctests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix for win Created 4 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/gc-tracer.cc ('k') | test/cctest/cctest.gyp » ('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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 chunk = heap->lo_space()->FindPage(addr); 375 chunk = heap->lo_space()->FindPage(addr);
376 } 376 }
377 return chunk; 377 return chunk;
378 } 378 }
379 379
380 Page* Page::FromAnyPointerAddress(Heap* heap, Address addr) { 380 Page* Page::FromAnyPointerAddress(Heap* heap, Address addr) {
381 return static_cast<Page*>(MemoryChunk::FromAnyPointerAddress(heap, addr)); 381 return static_cast<Page*>(MemoryChunk::FromAnyPointerAddress(heap, addr));
382 } 382 }
383 383
384 void Page::MarkNeverAllocateForTesting() { 384 void Page::MarkNeverAllocateForTesting() {
385 DCHECK(this->owner()->identity() != NEW_SPACE);
385 DCHECK(!IsFlagSet(NEVER_ALLOCATE_ON_PAGE)); 386 DCHECK(!IsFlagSet(NEVER_ALLOCATE_ON_PAGE));
386 SetFlag(NEVER_ALLOCATE_ON_PAGE); 387 SetFlag(NEVER_ALLOCATE_ON_PAGE);
387 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this); 388 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this);
388 } 389 }
389 390
390 void Page::MarkEvacuationCandidate() { 391 void Page::MarkEvacuationCandidate() {
391 DCHECK(!IsFlagSet(NEVER_EVACUATE)); 392 DCHECK(!IsFlagSet(NEVER_EVACUATE));
392 DCHECK_NULL(old_to_old_slots_); 393 DCHECK_NULL(old_to_old_slots_);
393 DCHECK_NULL(typed_old_to_old_slots_); 394 DCHECK_NULL(typed_old_to_old_slots_);
394 SetFlag(EVACUATION_CANDIDATE); 395 SetFlag(EVACUATION_CANDIDATE);
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 other->allocation_info_.Reset(nullptr, nullptr); 715 other->allocation_info_.Reset(nullptr, nullptr);
715 return true; 716 return true;
716 } 717 }
717 return false; 718 return false;
718 } 719 }
719 720
720 } // namespace internal 721 } // namespace internal
721 } // namespace v8 722 } // namespace v8
722 723
723 #endif // V8_HEAP_SPACES_INL_H_ 724 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698