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

Unified Diff: src/serialize.cc

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address second set of comments Created 5 years, 11 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/sampler.cc ('k') | src/utils.cc » ('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 0c9df8e51be5b97523b3480074ba060e232f1dd8..fcc0b190a46a8ca1f0b5f15c29856014ee7e15c3 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -899,6 +899,23 @@ void Deserializer::ReadObject(int space_number, Object** write_back) {
DCHECK(space_number != CODE_SPACE);
}
#endif
+#if V8_TARGET_ARCH_PPC && \
+ (ABI_USES_FUNCTION_DESCRIPTORS || V8_OOL_CONSTANT_POOL)
+ // If we're on a platform that uses function descriptors
+ // these jump tables make use of RelocInfo::INTERNAL_REFERENCE.
+ // As the V8 serialization code doesn't handle that relocation type
+ // we use this to fix up code that has function descriptors.
+ if (space_number == CODE_SPACE) {
+ Code* code = reinterpret_cast<Code*>(HeapObject::FromAddress(address));
+ for (RelocIterator it(code); !it.done(); it.next()) {
+ RelocInfo::Mode rmode = it.rinfo()->rmode();
+ if (rmode == RelocInfo::INTERNAL_REFERENCE) {
Yang 2015/02/06 07:08:14 I'm quite puzzled by this. It is true that V8 curr
michael_dawson 2015/02/06 23:06:35 We are not surprised that there are some comments
+ Assembler::RelocateInternalReference(it.rinfo()->pc(), 0,
+ code->instruction_start());
+ }
+ }
+ }
+#endif
}
« no previous file with comments | « src/sampler.cc ('k') | src/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698