Index: src/ia32/assembler-ia32-inl.h |
diff --git a/src/ia32/assembler-ia32-inl.h b/src/ia32/assembler-ia32-inl.h |
index 05cc23a71d952cb4e4727d2237c2780c06faa0d5..74dddc708dfa1423493447843c5b3e45f910f70a 100644 |
--- a/src/ia32/assembler-ia32-inl.h |
+++ b/src/ia32/assembler-ia32-inl.h |
@@ -249,6 +249,18 @@ Object** RelocInfo::call_object_address() { |
} |
+void RelocInfo::WipeOut() { |
+ if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_)) { |
+ Memory::Address_at(pc_) = NULL; |
+ } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { |
+ // Effectively write zero into the relocation. |
+ Assembler::set_target_address_at(pc_, pc_ + sizeof(int32_t)); |
+ } else { |
+ UNREACHABLE(); |
+ } |
+} |
+ |
+ |
bool RelocInfo::IsPatchedReturnSequence() { |
return *pc_ == kCallOpcode; |
} |