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 5945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5956 RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr); | 5956 RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr); |
5957 RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr); | 5957 RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr); |
5958 } | 5958 } |
5959 } | 5959 } |
5960 | 5960 |
5961 void Heap::ClearRecordedSlotRange(Address start, Address end) { | 5961 void Heap::ClearRecordedSlotRange(Address start, Address end) { |
5962 Page* page = Page::FromAddress(start); | 5962 Page* page = Page::FromAddress(start); |
5963 if (!page->InNewSpace()) { | 5963 if (!page->InNewSpace()) { |
5964 store_buffer()->MoveEntriesToRememberedSet(); | 5964 store_buffer()->MoveEntriesToRememberedSet(); |
5965 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); | 5965 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); |
5966 RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end); | 5966 RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end, |
5967 RememberedSet<OLD_TO_OLD>::RemoveRange(page, start, end); | 5967 SlotSet::PREFREE_EMPTY_BUCKETS); |
5968 RememberedSet<OLD_TO_OLD>::RemoveRange(page, start, end, | |
Hannes Payer (out of office)
2016/10/07 07:50:57
I added an additional mode here because old to old
Michael Lippautz
2016/10/07 09:11:06
Even if there's not concurrent access, I would in
| |
5969 SlotSet::FREE_EMPTY_BUCKETS); | |
5968 } | 5970 } |
5969 } | 5971 } |
5970 | 5972 |
5971 void Heap::RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, | 5973 void Heap::RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, |
5972 Object* value) { | 5974 Object* value) { |
5973 DCHECK(InNewSpace(value)); | 5975 DCHECK(InNewSpace(value)); |
5974 Page* source_page = Page::FromAddress(reinterpret_cast<Address>(host)); | 5976 Page* source_page = Page::FromAddress(reinterpret_cast<Address>(host)); |
5975 RelocInfo::Mode rmode = rinfo->rmode(); | 5977 RelocInfo::Mode rmode = rinfo->rmode(); |
5976 Address addr = rinfo->pc(); | 5978 Address addr = rinfo->pc(); |
5977 SlotType slot_type = SlotTypeForRelocInfoMode(rmode); | 5979 SlotType slot_type = SlotTypeForRelocInfoMode(rmode); |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6528 } | 6530 } |
6529 | 6531 |
6530 | 6532 |
6531 // static | 6533 // static |
6532 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6534 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6533 return StaticVisitorBase::GetVisitorId(map); | 6535 return StaticVisitorBase::GetVisitorId(map); |
6534 } | 6536 } |
6535 | 6537 |
6536 } // namespace internal | 6538 } // namespace internal |
6537 } // namespace v8 | 6539 } // namespace v8 |
OLD | NEW |