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

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

Issue 2773093002: Revert "[heap] Make SlotSet allocation thread-safe and refactor code." (Closed)
Patch Set: Created 3 years, 9 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') | no next file » | 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 void Page::MarkNeverAllocateForTesting() { 324 void Page::MarkNeverAllocateForTesting() {
325 DCHECK(this->owner()->identity() != NEW_SPACE); 325 DCHECK(this->owner()->identity() != NEW_SPACE);
326 DCHECK(!IsFlagSet(NEVER_ALLOCATE_ON_PAGE)); 326 DCHECK(!IsFlagSet(NEVER_ALLOCATE_ON_PAGE));
327 SetFlag(NEVER_ALLOCATE_ON_PAGE); 327 SetFlag(NEVER_ALLOCATE_ON_PAGE);
328 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this); 328 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this);
329 } 329 }
330 330
331 void Page::MarkEvacuationCandidate() { 331 void Page::MarkEvacuationCandidate() {
332 DCHECK(!IsFlagSet(NEVER_EVACUATE)); 332 DCHECK(!IsFlagSet(NEVER_EVACUATE));
333 DCHECK_NULL(slot_set<OLD_TO_OLD>()); 333 DCHECK_NULL(old_to_old_slots_);
334 DCHECK_NULL(typed_slot_set<OLD_TO_OLD>()); 334 DCHECK_NULL(typed_old_to_old_slots_);
335 SetFlag(EVACUATION_CANDIDATE); 335 SetFlag(EVACUATION_CANDIDATE);
336 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this); 336 reinterpret_cast<PagedSpace*>(owner())->free_list()->EvictFreeListItems(this);
337 } 337 }
338 338
339 void Page::ClearEvacuationCandidate() { 339 void Page::ClearEvacuationCandidate() {
340 if (!IsFlagSet(COMPACTION_WAS_ABORTED)) { 340 if (!IsFlagSet(COMPACTION_WAS_ABORTED)) {
341 DCHECK_NULL(slot_set<OLD_TO_OLD>()); 341 DCHECK_NULL(old_to_old_slots_);
342 DCHECK_NULL(typed_slot_set<OLD_TO_OLD>()); 342 DCHECK_NULL(typed_old_to_old_slots_);
343 } 343 }
344 ClearFlag(EVACUATION_CANDIDATE); 344 ClearFlag(EVACUATION_CANDIDATE);
345 InitializeFreeListCategories(); 345 InitializeFreeListCategories();
346 } 346 }
347 347
348 MemoryChunkIterator::MemoryChunkIterator(Heap* heap) 348 MemoryChunkIterator::MemoryChunkIterator(Heap* heap)
349 : heap_(heap), 349 : heap_(heap),
350 state_(kOldSpaceState), 350 state_(kOldSpaceState),
351 old_iterator_(heap->old_space()->begin()), 351 old_iterator_(heap->old_space()->begin()),
352 code_iterator_(heap->code_space()->begin()), 352 code_iterator_(heap->code_space()->begin()),
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 other->allocation_info_.Reset(nullptr, nullptr); 669 other->allocation_info_.Reset(nullptr, nullptr);
670 return true; 670 return true;
671 } 671 }
672 return false; 672 return false;
673 } 673 }
674 674
675 } // namespace internal 675 } // namespace internal
676 } // namespace v8 676 } // namespace v8
677 677
678 #endif // V8_HEAP_SPACES_INL_H_ 678 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698