Index: src/ia32/assembler-ia32-inl.h |
diff --git a/src/ia32/assembler-ia32-inl.h b/src/ia32/assembler-ia32-inl.h |
index 7647bc18e7dcff88dddb4fecb9ae2b590f6655f0..f9f1dc920d6b923b9ce125557a433c7e9e6b7349 100644 |
--- a/src/ia32/assembler-ia32-inl.h |
+++ b/src/ia32/assembler-ia32-inl.h |
@@ -117,7 +117,7 @@ void RelocInfo::set_target_object(HeapObject* target, |
DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
Memory::Object_at(pc_) = target; |
if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
- Assembler::FlushICache(isolate_, pc_, sizeof(Address)); |
+ Assembler::FlushICache(target->GetIsolate(), pc_, sizeof(Address)); |
} |
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { |
host()->GetHeap()->RecordWriteIntoCode(host(), this, target); |
@@ -150,13 +150,12 @@ Address RelocInfo::target_runtime_entry(Assembler* origin) { |
return reinterpret_cast<Address>(*reinterpret_cast<int32_t*>(pc_)); |
} |
- |
-void RelocInfo::set_target_runtime_entry(Address target, |
+void RelocInfo::set_target_runtime_entry(Isolate* isolate, Address target, |
WriteBarrierMode write_barrier_mode, |
ICacheFlushMode icache_flush_mode) { |
DCHECK(IsRuntimeEntry(rmode_)); |
if (target_address() != target) { |
- set_target_address(target, write_barrier_mode, icache_flush_mode); |
+ set_target_address(isolate, target, write_barrier_mode, icache_flush_mode); |
} |
} |
@@ -182,7 +181,7 @@ void RelocInfo::set_target_cell(Cell* cell, |
Address address = cell->address() + Cell::kValueOffset; |
Memory::Address_at(pc_) = address; |
if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
- Assembler::FlushICache(isolate_, pc_, sizeof(Address)); |
+ Assembler::FlushICache(cell->GetIsolate(), pc_, sizeof(Address)); |
} |
if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { |
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, |
@@ -209,8 +208,9 @@ void RelocInfo::set_code_age_stub(Code* stub, |
ICacheFlushMode icache_flush_mode) { |
DCHECK(*pc_ == kCallOpcode); |
DCHECK(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); |
- Assembler::set_target_address_at( |
- isolate_, pc_ + 1, host_, stub->instruction_start(), icache_flush_mode); |
+ Assembler::set_target_address_at(stub->GetIsolate(), pc_ + 1, host_, |
+ stub->instruction_start(), |
+ icache_flush_mode); |
} |
@@ -220,11 +220,10 @@ Address RelocInfo::debug_call_address() { |
return Assembler::target_address_at(location, host_); |
} |
- |
-void RelocInfo::set_debug_call_address(Address target) { |
+void RelocInfo::set_debug_call_address(Isolate* isolate, Address target) { |
DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); |
Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; |
- Assembler::set_target_address_at(isolate_, location, host_, target); |
+ Assembler::set_target_address_at(isolate, location, host_, target); |
if (host() != NULL) { |
Code* target_code = Code::GetCodeFromTargetAddress(target); |
host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, |
@@ -232,14 +231,13 @@ void RelocInfo::set_debug_call_address(Address target) { |
} |
} |
- |
-void RelocInfo::WipeOut() { |
+void RelocInfo::WipeOut(Isolate* isolate) { |
if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || |
IsInternalReference(rmode_)) { |
Memory::Address_at(pc_) = NULL; |
} else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { |
// Effectively write zero into the relocation. |
- Assembler::set_target_address_at(isolate_, pc_, host_, |
+ Assembler::set_target_address_at(isolate, pc_, host_, |
pc_ + sizeof(int32_t)); |
} else { |
UNREACHABLE(); |
@@ -434,6 +432,7 @@ Address Assembler::target_address_at(Address pc, Address constant_pool) { |
void Assembler::set_target_address_at(Isolate* isolate, Address pc, |
Address constant_pool, Address target, |
ICacheFlushMode icache_flush_mode) { |
+ DCHECK_IMPLIES(isolate == nullptr, icache_flush_mode == SKIP_ICACHE_FLUSH); |
int32_t* p = reinterpret_cast<int32_t*>(pc); |
*p = target - (pc + sizeof(int32_t)); |
if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |