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

Side by Side Diff: src/heap/mark-compact.cc

Issue 2799943002: Handle ExternalStrings directly in the serializer without ObjectVisitor. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | src/objects.h » ('j') | src/snapshot/serializer.cc » ('J')
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/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 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 DCHECK(RelocInfo::IsCodeAgeSequence(rinfo->rmode())); 1671 DCHECK(RelocInfo::IsCodeAgeSequence(rinfo->rmode()));
1672 Code* stub = rinfo->code_age_stub(); 1672 Code* stub = rinfo->code_age_stub();
1673 USE(stub); 1673 USE(stub);
1674 DCHECK(!Page::FromAddress(stub->address())->IsEvacuationCandidate()); 1674 DCHECK(!Page::FromAddress(stub->address())->IsEvacuationCandidate());
1675 } 1675 }
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(
1682 v8::String::ExternalOneByteStringResource** resource) final {}
1683 inline void VisitExternalTwoByteString(
1684 v8::String::ExternalStringResource** resource) final {}
1685 inline void VisitInternalReference(RelocInfo* rinfo) final {} 1681 inline void VisitInternalReference(RelocInfo* rinfo) final {}
1686 inline void VisitEmbedderReference(Object** p, uint16_t class_id) final {} 1682 inline void VisitEmbedderReference(Object** p, uint16_t class_id) final {}
1687 1683
1688 private: 1684 private:
1689 inline void RecordMigratedSlot(Object* value, Address slot) { 1685 inline void RecordMigratedSlot(Object* value, Address slot) {
1690 if (value->IsHeapObject()) { 1686 if (value->IsHeapObject()) {
1691 Page* p = Page::FromAddress(reinterpret_cast<Address>(value)); 1687 Page* p = Page::FromAddress(reinterpret_cast<Address>(value));
1692 if (p->InNewSpace()) { 1688 if (p->InNewSpace()) {
1693 RememberedSet<OLD_TO_NEW>::Insert(Page::FromAddress(slot), slot); 1689 RememberedSet<OLD_TO_NEW>::Insert(Page::FromAddress(slot), slot);
1694 } else if (p->IsEvacuationCandidate()) { 1690 } else if (p->IsEvacuationCandidate()) {
(...skipping 2474 matching lines...) Expand 10 before | Expand all | Expand 10 after
4169 // The target is always in old space, we don't have to record the slot in 4165 // The target is always in old space, we don't have to record the slot in
4170 // the old-to-new remembered set. 4166 // the old-to-new remembered set.
4171 DCHECK(!heap()->InNewSpace(target)); 4167 DCHECK(!heap()->InNewSpace(target));
4172 RecordRelocSlot(host, &rinfo, target); 4168 RecordRelocSlot(host, &rinfo, target);
4173 } 4169 }
4174 } 4170 }
4175 } 4171 }
4176 4172
4177 } // namespace internal 4173 } // namespace internal
4178 } // namespace v8 4174 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/snapshot/serializer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698