Index: src/arm/assembler-arm-inl.h |
diff --git a/src/arm/assembler-arm-inl.h b/src/arm/assembler-arm-inl.h |
index 32c3c86cc1849782299b217f2b516c16794d1a76..5cb41cab4ec99c9c2445b6a6daa16d2d7d600b0f 100644 |
--- a/src/arm/assembler-arm-inl.h |
+++ b/src/arm/assembler-arm-inl.h |
@@ -74,14 +74,13 @@ int RelocInfo::target_address_size() { |
} |
-void RelocInfo::set_target_address(Address target, Code* code) { |
+void RelocInfo::set_target_address(Address target) { |
ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); |
Assembler::set_target_address_at(pc_, target); |
- if (code != NULL && IsCodeTarget(rmode_)) { |
+ if (host() != NULL && IsCodeTarget(rmode_)) { |
Object* target_code = Code::GetCodeFromTargetAddress(target); |
- // TODO(1550) We do not compact code pages. |
- code->GetHeap()->incremental_marking()->RecordWrite( |
- code, NULL, HeapObject::cast(target_code)); |
+ host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( |
+ host(), this, HeapObject::cast(target_code)); |
} |
} |
@@ -104,15 +103,12 @@ Object** RelocInfo::target_object_address() { |
} |
-void RelocInfo::set_target_object(Object* target, Code* code) { |
+void RelocInfo::set_target_object(Object* target) { |
ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
Assembler::set_target_address_at(pc_, reinterpret_cast<Address>(target)); |
- if (code != NULL && target->IsHeapObject()) { |
- // It is safe to record this slot as a simple in object slot |
- // because it resides outside of code stream and updating it |
- // does not require code cache flushing. |
- code->GetHeap()->incremental_marking()->RecordWrite( |
- code, target_object_address(), HeapObject::cast(target)); |
+ if (host() != NULL && target->IsHeapObject()) { |
+ host()->GetHeap()->incremental_marking()->RecordWrite( |
+ host(), &Memory::Object_at(pc_), HeapObject::cast(target)); |
} |
} |
@@ -140,13 +136,15 @@ JSGlobalPropertyCell* RelocInfo::target_cell() { |
} |
-void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, Code* code) { |
+void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell) { |
ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; |
Memory::Address_at(pc_) = address; |
- if (code != NULL) { |
- code->GetHeap()->incremental_marking()->RecordWrite( |
- code, &Memory::Object_at(pc_), cell); |
+ if (host() != NULL) { |
+ // TODO(1550) We are passing NULL as a slot because cell can never be on |
+ // evacuation candidate. |
+ host()->GetHeap()->incremental_marking()->RecordWrite( |
+ host(), NULL, cell); |
} |
} |
@@ -164,6 +162,11 @@ void RelocInfo::set_call_address(Address target) { |
ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || |
(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); |
Memory::Address_at(pc_ + 2 * Assembler::kInstrSize) = target; |
+ if (host() != NULL) { |
+ Object* target_code = Code::GetCodeFromTargetAddress(target); |
+ host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( |
+ host(), this, HeapObject::cast(target_code)); |
+ } |
} |