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

Unified Diff: src/serialize.cc

Issue 1025453003: MIPS: Fix 'MIPS: Serializer: serialize internal references via object visitor.' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. Created 5 years, 9 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/serialize.h ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index 1d33f4f0623e3a38f2f46247b06a6e64eb93f60b..207620a406263311147ebe04f309738613f30d8a 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -1048,6 +1048,7 @@ void Deserializer::ReadData(Object** current, Object** limit, int source_space,
break;
}
+ case kInternalReferenceEncoded:
case kInternalReference: {
// Internal reference address is not encoded via skip, but by offset
// from code entry.
@@ -1059,7 +1060,10 @@ void Deserializer::ReadData(Object** current, Object** limit, int source_space,
DCHECK(0 <= target_offset && target_offset <= code->instruction_size());
Address pc = code->entry() + pc_offset;
Address target = code->entry() + target_offset;
- Assembler::deserialization_set_target_internal_reference_at(pc, target);
+ Assembler::deserialization_set_target_internal_reference_at(
+ pc, target, data == kInternalReference
+ ? RelocInfo::INTERNAL_REFERENCE
+ : RelocInfo::INTERNAL_REFERENCE_ENCODED);
break;
}
@@ -1827,7 +1831,10 @@ void Serializer::ObjectSerializer::VisitInternalReference(RelocInfo* rinfo) {
pc_offset <= Code::cast(object_)->instruction_size());
DCHECK(0 <= target_offset &&
target_offset <= Code::cast(object_)->instruction_size());
- sink_->Put(kInternalReference, "InternalRef");
+ sink_->Put(rinfo->rmode() == RelocInfo::INTERNAL_REFERENCE
+ ? kInternalReference
+ : kInternalReferenceEncoded,
+ "InternalRef");
sink_->PutInt(static_cast<uintptr_t>(pc_offset), "internal ref address");
sink_->PutInt(static_cast<uintptr_t>(target_offset), "internal ref value");
}
« no previous file with comments | « src/serialize.h ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698