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

Side by Side Diff: src/heap/heap.cc

Issue 1735523002: Reland "Replace slots buffer with remembered set. (patchset #14 id:250001 of https://codereview.chr… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: one more int->size_t Created 4 years, 10 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 | « BUILD.gn ('k') | src/heap/incremental-marking.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include "src/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 5558 matching lines...) Expand 10 before | Expand all | Expand 10 after
5569 isolate_->handle_scope_implementer()->Iterate(&v); 5569 isolate_->handle_scope_implementer()->Iterate(&v);
5570 } 5570 }
5571 5571
5572 void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) { 5572 void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) {
5573 if (!InNewSpace(object)) { 5573 if (!InNewSpace(object)) {
5574 store_buffer()->MoveEntriesToRememberedSet(); 5574 store_buffer()->MoveEntriesToRememberedSet();
5575 Address slot_addr = reinterpret_cast<Address>(slot); 5575 Address slot_addr = reinterpret_cast<Address>(slot);
5576 Page* page = Page::FromAddress(slot_addr); 5576 Page* page = Page::FromAddress(slot_addr);
5577 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); 5577 DCHECK_EQ(page->owner()->identity(), OLD_SPACE);
5578 RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr); 5578 RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr);
5579 RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr);
5579 } 5580 }
5580 } 5581 }
5581 5582
5582 void Heap::ClearRecordedSlotRange(Address start, Address end) { 5583 void Heap::ClearRecordedSlotRange(Address start, Address end) {
5583 Page* page = Page::FromAddress(start); 5584 Page* page = Page::FromAddress(start);
5584 if (!page->InNewSpace()) { 5585 if (!page->InNewSpace()) {
5585 store_buffer()->MoveEntriesToRememberedSet(); 5586 store_buffer()->MoveEntriesToRememberedSet();
5586 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); 5587 DCHECK_EQ(page->owner()->identity(), OLD_SPACE);
5587 RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end); 5588 RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end);
5589 RememberedSet<OLD_TO_OLD>::RemoveRange(page, start, end);
5588 } 5590 }
5589 } 5591 }
5590 5592
5591 Space* AllSpaces::next() { 5593 Space* AllSpaces::next() {
5592 switch (counter_++) { 5594 switch (counter_++) {
5593 case NEW_SPACE: 5595 case NEW_SPACE:
5594 return heap_->new_space(); 5596 return heap_->new_space();
5595 case OLD_SPACE: 5597 case OLD_SPACE:
5596 return heap_->old_space(); 5598 return heap_->old_space();
5597 case CODE_SPACE: 5599 case CODE_SPACE:
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
6320 } 6322 }
6321 6323
6322 6324
6323 // static 6325 // static
6324 int Heap::GetStaticVisitorIdForMap(Map* map) { 6326 int Heap::GetStaticVisitorIdForMap(Map* map) {
6325 return StaticVisitorBase::GetVisitorId(map); 6327 return StaticVisitorBase::GetVisitorId(map);
6326 } 6328 }
6327 6329
6328 } // namespace internal 6330 } // namespace internal
6329 } // namespace v8 6331 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698