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 |
} |