Index: src/x64/assembler-x64-inl.h |
diff --git a/src/x64/assembler-x64-inl.h b/src/x64/assembler-x64-inl.h |
index afac886c730e12fb6b26fe0b9746144987ecc933..ea32930ade9d6371db18764481ba78631363f3a1 100644 |
--- a/src/x64/assembler-x64-inl.h |
+++ b/src/x64/assembler-x64-inl.h |
@@ -370,6 +370,18 @@ void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode mode) { |
} |
+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() { |
// The recognized call sequence is: |
// movq(kScratchRegister, address); call(kScratchRegister); |