Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index 5c5c8423b4e4d53719a13742e22413f8e4b4bbd1..625751561ac49cecb349a7a98724fa224bf5ca0a 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -3455,6 +3455,18 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
if (!instr->transition().is_null()) { |
__ li(scratch, Operand(instr->transition())); |
__ sw(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, |
+ kRAHasBeenSaved, |
+ kSaveFPRegs, |
+ OMIT_REMEMBERED_SET, |
+ OMIT_SMI_CHECK); |
+ } |
} |
// Do the store. |