| Index: src/arm/assembler-arm-inl.h
 | 
| ===================================================================
 | 
| --- src/arm/assembler-arm-inl.h	(revision 9531)
 | 
| +++ src/arm/assembler-arm-inl.h	(working copy)
 | 
| @@ -77,6 +77,11 @@
 | 
|  void RelocInfo::set_target_address(Address target) {
 | 
|    ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
 | 
|    Assembler::set_target_address_at(pc_, target);
 | 
| +  if (host() != NULL && IsCodeTarget(rmode_)) {
 | 
| +    Object* target_code = Code::GetCodeFromTargetAddress(target);
 | 
| +    host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
 | 
| +        host(), this, HeapObject::cast(target_code));
 | 
| +  }
 | 
|  }
 | 
|  
 | 
|  
 | 
| @@ -101,6 +106,10 @@
 | 
|  void RelocInfo::set_target_object(Object* target) {
 | 
|    ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
 | 
|    Assembler::set_target_address_at(pc_, reinterpret_cast<Address>(target));
 | 
| +  if (host() != NULL && target->IsHeapObject()) {
 | 
| +    host()->GetHeap()->incremental_marking()->RecordWrite(
 | 
| +        host(), &Memory::Object_at(pc_), HeapObject::cast(target));
 | 
| +  }
 | 
|  }
 | 
|  
 | 
|  
 | 
| @@ -131,6 +140,12 @@
 | 
|    ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
 | 
|    Address address = cell->address() + JSGlobalPropertyCell::kValueOffset;
 | 
|    Memory::Address_at(pc_) = address;
 | 
| +  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);
 | 
| +  }
 | 
|  }
 | 
|  
 | 
|  
 | 
| @@ -147,6 +162,11 @@
 | 
|    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));
 | 
| +  }
 | 
|  }
 | 
|  
 | 
|  
 | 
| @@ -195,7 +215,7 @@
 | 
|  void RelocInfo::Visit(ObjectVisitor* visitor) {
 | 
|    RelocInfo::Mode mode = rmode();
 | 
|    if (mode == RelocInfo::EMBEDDED_OBJECT) {
 | 
| -    visitor->VisitPointer(target_object_address());
 | 
| +    visitor->VisitEmbeddedPointer(host(), target_object_address());
 | 
|    } else if (RelocInfo::IsCodeTarget(mode)) {
 | 
|      visitor->VisitCodeTarget(this);
 | 
|    } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
 | 
| @@ -221,7 +241,7 @@
 | 
|  void RelocInfo::Visit(Heap* heap) {
 | 
|    RelocInfo::Mode mode = rmode();
 | 
|    if (mode == RelocInfo::EMBEDDED_OBJECT) {
 | 
| -    StaticVisitor::VisitPointer(heap, target_object_address());
 | 
| +    StaticVisitor::VisitEmbeddedPointer(heap, host(), target_object_address());
 | 
|    } else if (RelocInfo::IsCodeTarget(mode)) {
 | 
|      StaticVisitor::VisitCodeTarget(heap, this);
 | 
|    } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
 | 
| 
 |