Index: src/assembler.cc |
diff --git a/src/assembler.cc b/src/assembler.cc |
index 9235106db5ca2baebcc58b9b8f519e701a80dc09..83dbbe813409944fcb809c3db777a4d89d7195fa 100644 |
--- a/src/assembler.cc |
+++ b/src/assembler.cc |
@@ -388,6 +388,20 @@ void RelocInfo::update_wasm_global_reference( |
} |
} |
+void RelocInfo::set_target_address(Address target, |
+ WriteBarrierMode write_barrier_mode, |
+ ICacheFlushMode icache_flush_mode) { |
+ DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); |
+ Assembler::set_target_address_at(isolate_, pc_, host_, target, |
+ icache_flush_mode); |
+ if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL && |
+ IsCodeTarget(rmode_)) { |
+ Object* target_code = Code::GetCodeFromTargetAddress(target); |
+ host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( |
+ host(), this, HeapObject::cast(target_code)); |
+ } |
+} |
+ |
uint32_t RelocInfoWriter::WriteLongPCJump(uint32_t pc_delta) { |
// Return if the pc_delta can fit in kSmallPCDeltaBits bits. |
// Otherwise write a variable length PC jump for the bits that do |