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

Unified Diff: src/objects.cc

Issue 2810653002: Add a host parameter to ObjectVisitor methods. (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-body-descriptors-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 439071486878bc8d38eb0c88fe0e210006f3cd79..1ff56694c08f3a9a4d18fc820ff1ab2311b775d9 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -13881,72 +13881,58 @@ Code* SharedFunctionInfo::SearchOptimizedCodeMap(Context* native_context,
return result;
}
-
-void ObjectVisitor::VisitCodeTarget(RelocInfo* rinfo) {
+void ObjectVisitor::VisitCodeTarget(Code* host, RelocInfo* rinfo) {
DCHECK(RelocInfo::IsCodeTarget(rinfo->rmode()));
Object* old_pointer = Code::GetCodeFromTargetAddress(rinfo->target_address());
Object* new_pointer = old_pointer;
- VisitPointer(&new_pointer);
+ VisitPointer(host, &new_pointer);
DCHECK_EQ(old_pointer, new_pointer);
}
-
-void ObjectVisitor::VisitCodeAgeSequence(RelocInfo* rinfo) {
+void ObjectVisitor::VisitCodeAgeSequence(Code* host, RelocInfo* rinfo) {
DCHECK(RelocInfo::IsCodeAgeSequence(rinfo->rmode()));
Object* old_pointer = rinfo->code_age_stub();
Object* new_pointer = old_pointer;
if (old_pointer != nullptr) {
- VisitPointer(&new_pointer);
+ VisitPointer(host, &new_pointer);
DCHECK_EQ(old_pointer, new_pointer);
}
}
-
-void ObjectVisitor::VisitCodeEntry(Address entry_address) {
+void ObjectVisitor::VisitCodeEntry(JSFunction* host, Address entry_address) {
Object* old_pointer = Code::GetObjectFromEntryAddress(entry_address);
Object* new_pointer = old_pointer;
- VisitPointer(&new_pointer);
+ VisitPointer(host, &new_pointer);
DCHECK_EQ(old_pointer, new_pointer);
}
-
-void ObjectVisitor::VisitCell(RelocInfo* rinfo) {
+void ObjectVisitor::VisitCellPointer(Code* host, RelocInfo* rinfo) {
DCHECK(rinfo->rmode() == RelocInfo::CELL);
Object* old_pointer = rinfo->target_cell();
Object* new_pointer = old_pointer;
- VisitPointer(&new_pointer);
+ VisitPointer(host, &new_pointer);
DCHECK_EQ(old_pointer, new_pointer);
}
-
-void ObjectVisitor::VisitDebugTarget(RelocInfo* rinfo) {
+void ObjectVisitor::VisitDebugTarget(Code* host, RelocInfo* rinfo) {
DCHECK(RelocInfo::IsDebugBreakSlot(rinfo->rmode()) &&
rinfo->IsPatchedDebugBreakSlotSequence());
Object* old_pointer =
Code::GetCodeFromTargetAddress(rinfo->debug_call_address());
Object* new_pointer = old_pointer;
- VisitPointer(&new_pointer);
+ VisitPointer(host, &new_pointer);
DCHECK_EQ(old_pointer, new_pointer);
}
-
-void ObjectVisitor::VisitEmbeddedPointer(RelocInfo* rinfo) {
+void ObjectVisitor::VisitEmbeddedPointer(Code* host, RelocInfo* rinfo) {
DCHECK(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
Object* old_pointer = rinfo->target_object();
Object* new_pointer = old_pointer;
- VisitPointer(&new_pointer);
+ VisitPointer(host, &new_pointer);
DCHECK_EQ(old_pointer, new_pointer);
}
-void ObjectVisitor::VisitExternalReference(RelocInfo* rinfo) {
- Address old_reference = rinfo->target_external_reference();
- Address new_reference = old_reference;
- VisitExternalReference(&new_reference);
- DCHECK_EQ(old_reference, new_reference);
-}
-
-
void Code::InvalidateRelocation() {
InvalidateEmbeddedObjects();
set_relocation_info(GetHeap()->empty_byte_array());
« no previous file with comments | « src/objects.h ('k') | src/objects-body-descriptors-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698