Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index fd4b3e84085509a352f9f3fed4805585bfcb0549..a360334df49bb2f38ef6207b573c79d5e529ffd9 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -3675,6 +3675,18 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
if (!instr->transition().is_null()) { |
__ mov(scratch, Operand(instr->transition())); |
__ str(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ if (instr->hydrogen()->NeedsWriteBarrierForMap()) { |
+ Register temp = ToRegister(instr->TempAt(0)); |
+ // Update the write barrier for the map field. |
+ __ RecordWriteField(object, |
+ HeapObject::kMapOffset, |
+ scratch, |
+ temp, |
+ kLRHasBeenSaved, |
+ kSaveFPRegs, |
+ OMIT_REMEMBERED_SET, |
+ OMIT_SMI_CHECK); |
+ } |
} |
// Do the store. |