OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |