| 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/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 5867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5878 void Heap::CheckHandleCount() { | 5878 void Heap::CheckHandleCount() { |
| 5879 CheckHandleCountVisitor v; | 5879 CheckHandleCountVisitor v; |
| 5880 isolate_->handle_scope_implementer()->Iterate(&v); | 5880 isolate_->handle_scope_implementer()->Iterate(&v); |
| 5881 } | 5881 } |
| 5882 | 5882 |
| 5883 void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) { | 5883 void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) { |
| 5884 if (!InNewSpace(object)) { | 5884 if (!InNewSpace(object)) { |
| 5885 Address slot_addr = reinterpret_cast<Address>(slot); | 5885 Address slot_addr = reinterpret_cast<Address>(slot); |
| 5886 Page* page = Page::FromAddress(slot_addr); | 5886 Page* page = Page::FromAddress(slot_addr); |
| 5887 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); | 5887 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); |
| 5888 store_buffer()->MoveAllEntriesToRememberedSet(); | 5888 store_buffer()->DeleteEntry(slot_addr); |
| 5889 RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr); | |
| 5890 RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr); | 5889 RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr); |
| 5891 } | 5890 } |
| 5892 } | 5891 } |
| 5893 | 5892 |
| 5894 void Heap::ClearRecordedSlotRange(Address start, Address end) { | 5893 void Heap::ClearRecordedSlotRange(Address start, Address end) { |
| 5895 Page* page = Page::FromAddress(start); | 5894 Page* page = Page::FromAddress(start); |
| 5896 if (!page->InNewSpace()) { | 5895 if (!page->InNewSpace()) { |
| 5897 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); | 5896 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); |
| 5898 store_buffer()->MoveAllEntriesToRememberedSet(); | 5897 store_buffer()->DeleteEntry(start, end); |
| 5899 RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end, | |
| 5900 SlotSet::PREFREE_EMPTY_BUCKETS); | |
| 5901 RememberedSet<OLD_TO_OLD>::RemoveRange(page, start, end, | 5898 RememberedSet<OLD_TO_OLD>::RemoveRange(page, start, end, |
| 5902 SlotSet::FREE_EMPTY_BUCKETS); | 5899 SlotSet::FREE_EMPTY_BUCKETS); |
| 5903 } | 5900 } |
| 5904 } | 5901 } |
| 5905 | 5902 |
| 5906 void Heap::RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, | 5903 void Heap::RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, |
| 5907 Object* value) { | 5904 Object* value) { |
| 5908 DCHECK(InNewSpace(value)); | 5905 DCHECK(InNewSpace(value)); |
| 5909 Page* source_page = Page::FromAddress(reinterpret_cast<Address>(host)); | 5906 Page* source_page = Page::FromAddress(reinterpret_cast<Address>(host)); |
| 5910 RelocInfo::Mode rmode = rinfo->rmode(); | 5907 RelocInfo::Mode rmode = rinfo->rmode(); |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6467 } | 6464 } |
| 6468 | 6465 |
| 6469 | 6466 |
| 6470 // static | 6467 // static |
| 6471 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6468 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6472 return StaticVisitorBase::GetVisitorId(map); | 6469 return StaticVisitorBase::GetVisitorId(map); |
| 6473 } | 6470 } |
| 6474 | 6471 |
| 6475 } // namespace internal | 6472 } // namespace internal |
| 6476 } // namespace v8 | 6473 } // namespace v8 |
| OLD | NEW |