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/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 | 1676 |
1677 // Entries that are skipped for recording. | 1677 // Entries that are skipped for recording. |
1678 inline void VisitExternalReference(RelocInfo* rinfo) final {} | 1678 inline void VisitExternalReference(RelocInfo* rinfo) final {} |
1679 inline void VisitExternalReference(Address* p) final {} | 1679 inline void VisitExternalReference(Address* p) final {} |
1680 inline void VisitRuntimeEntry(RelocInfo* rinfo) final {} | 1680 inline void VisitRuntimeEntry(RelocInfo* rinfo) final {} |
1681 inline void VisitExternalOneByteString( | 1681 inline void VisitExternalOneByteString( |
1682 v8::String::ExternalOneByteStringResource** resource) final {} | 1682 v8::String::ExternalOneByteStringResource** resource) final {} |
1683 inline void VisitExternalTwoByteString( | 1683 inline void VisitExternalTwoByteString( |
1684 v8::String::ExternalStringResource** resource) final {} | 1684 v8::String::ExternalStringResource** resource) final {} |
1685 inline void VisitInternalReference(RelocInfo* rinfo) final {} | 1685 inline void VisitInternalReference(RelocInfo* rinfo) final {} |
1686 inline void VisitEmbedderReference(Object** p, uint16_t class_id) final {} | |
1687 | 1686 |
1688 private: | 1687 private: |
1689 inline void RecordMigratedSlot(Object* value, Address slot) { | 1688 inline void RecordMigratedSlot(Object* value, Address slot) { |
1690 if (value->IsHeapObject()) { | 1689 if (value->IsHeapObject()) { |
1691 Page* p = Page::FromAddress(reinterpret_cast<Address>(value)); | 1690 Page* p = Page::FromAddress(reinterpret_cast<Address>(value)); |
1692 if (p->InNewSpace()) { | 1691 if (p->InNewSpace()) { |
1693 RememberedSet<OLD_TO_NEW>::Insert(Page::FromAddress(slot), slot); | 1692 RememberedSet<OLD_TO_NEW>::Insert(Page::FromAddress(slot), slot); |
1694 } else if (p->IsEvacuationCandidate()) { | 1693 } else if (p->IsEvacuationCandidate()) { |
1695 RememberedSet<OLD_TO_OLD>::Insert(Page::FromAddress(slot), slot); | 1694 RememberedSet<OLD_TO_OLD>::Insert(Page::FromAddress(slot), slot); |
1696 } | 1695 } |
(...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4169 // The target is always in old space, we don't have to record the slot in | 4168 // The target is always in old space, we don't have to record the slot in |
4170 // the old-to-new remembered set. | 4169 // the old-to-new remembered set. |
4171 DCHECK(!heap()->InNewSpace(target)); | 4170 DCHECK(!heap()->InNewSpace(target)); |
4172 RecordRelocSlot(host, &rinfo, target); | 4171 RecordRelocSlot(host, &rinfo, target); |
4173 } | 4172 } |
4174 } | 4173 } |
4175 } | 4174 } |
4176 | 4175 |
4177 } // namespace internal | 4176 } // namespace internal |
4178 } // namespace v8 | 4177 } // namespace v8 |
OLD | NEW |