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

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

Issue 1703823002: Replace slots buffer with remembered set. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments 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 5556 matching lines...) Expand 10 before | Expand all | Expand 10 after
5567 isolate_->handle_scope_implementer()->Iterate(&v); 5567 isolate_->handle_scope_implementer()->Iterate(&v);
5568 } 5568 }
5569 5569
5570 void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) { 5570 void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) {
5571 if (!InNewSpace(object)) { 5571 if (!InNewSpace(object)) {
5572 store_buffer()->MoveEntriesToRememberedSet(); 5572 store_buffer()->MoveEntriesToRememberedSet();
5573 Address slot_addr = reinterpret_cast<Address>(slot); 5573 Address slot_addr = reinterpret_cast<Address>(slot);
5574 Page* page = Page::FromAddress(slot_addr); 5574 Page* page = Page::FromAddress(slot_addr);
5575 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); 5575 DCHECK_EQ(page->owner()->identity(), OLD_SPACE);
5576 RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr); 5576 RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr);
5577 RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr);
5577 } 5578 }
5578 } 5579 }
5579 5580
5580 void Heap::ClearRecordedSlotRange(HeapObject* object, Object** start, 5581 void Heap::ClearRecordedSlotRange(HeapObject* object, Object** start,
5581 Object** end) { 5582 Object** end) {
5582 if (!InNewSpace(object)) { 5583 if (!InNewSpace(object)) {
5583 store_buffer()->MoveEntriesToRememberedSet(); 5584 store_buffer()->MoveEntriesToRememberedSet();
5584 Address start_addr = reinterpret_cast<Address>(start); 5585 Address start_addr = reinterpret_cast<Address>(start);
5585 Address end_addr = reinterpret_cast<Address>(end); 5586 Address end_addr = reinterpret_cast<Address>(end);
5586 Page* page = Page::FromAddress(start_addr); 5587 Page* page = Page::FromAddress(start_addr);
5587 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); 5588 DCHECK_EQ(page->owner()->identity(), OLD_SPACE);
5588 RememberedSet<OLD_TO_NEW>::RemoveRange(page, start_addr, end_addr); 5589 RememberedSet<OLD_TO_NEW>::RemoveRange(page, start_addr, end_addr);
5590 RememberedSet<OLD_TO_OLD>::RemoveRange(page, start_addr, end_addr);
5589 } 5591 }
5590 } 5592 }
5591 5593
5592 Space* AllSpaces::next() { 5594 Space* AllSpaces::next() {
5593 switch (counter_++) { 5595 switch (counter_++) {
5594 case NEW_SPACE: 5596 case NEW_SPACE:
5595 return heap_->new_space(); 5597 return heap_->new_space();
5596 case OLD_SPACE: 5598 case OLD_SPACE:
5597 return heap_->old_space(); 5599 return heap_->old_space();
5598 case CODE_SPACE: 5600 case CODE_SPACE:
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
6321 } 6323 }
6322 6324
6323 6325
6324 // static 6326 // static
6325 int Heap::GetStaticVisitorIdForMap(Map* map) { 6327 int Heap::GetStaticVisitorIdForMap(Map* map) {
6326 return StaticVisitorBase::GetVisitorId(map); 6328 return StaticVisitorBase::GetVisitorId(map);
6327 } 6329 }
6328 6330
6329 } // namespace internal 6331 } // namespace internal
6330 } // namespace v8 6332 } // 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