Index: src/arm/ic-arm.cc |
=================================================================== |
--- src/arm/ic-arm.cc (revision 9327) |
+++ src/arm/ic-arm.cc (working copy) |
@@ -208,7 +208,8 @@ |
// Update the write barrier. Make sure not to clobber the value. |
__ mov(scratch1, value); |
- __ RecordWrite(elements, scratch2, scratch1); |
+ __ RecordWrite( |
+ elements, scratch2, scratch1, kLRHasNotBeenSaved, kDontSaveFPRegs); |
} |
@@ -910,7 +911,8 @@ |
GenerateMappedArgumentsLookup(masm, r2, r1, r3, r4, r5, ¬in, &slow); |
__ str(r0, mapped_location); |
__ add(r6, r3, r5); |
- __ RecordWrite(r3, r6, r9); |
+ __ mov(r9, r0); |
+ __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs); |
__ Ret(); |
__ bind(¬in); |
// The unmapped lookup expects that the parameter map is in r3. |
@@ -918,7 +920,8 @@ |
GenerateUnmappedArgumentsLookup(masm, r1, r3, r4, &slow); |
__ str(r0, unmapped_location); |
__ add(r6, r3, r4); |
- __ RecordWrite(r3, r6, r9); |
+ __ mov(r9, r0); |
+ __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs); |
__ Ret(); |
__ bind(&slow); |
GenerateMiss(masm, false); |
@@ -1355,16 +1358,25 @@ |
// Fall through to fast case. |
__ bind(&fast); |
+ Register scratch_value = r4; |
+ Register address = r5; |
// Fast case, store the value to the elements backing store. |
- __ add(r5, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
- __ add(r5, r5, Operand(key, LSL, kPointerSizeLog2 - kSmiTagSize)); |
- __ str(value, MemOperand(r5)); |
+ __ add(address, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
+ __ add(address, address, Operand(key, LSL, kPointerSizeLog2 - kSmiTagSize)); |
+ __ str(value, MemOperand(address)); |
// Skip write barrier if the written value is a smi. |
__ tst(value, Operand(kSmiTagMask)); |
__ Ret(eq); |
+ |
// Update write barrier for the elements array address. |
- __ sub(r4, r5, Operand(elements)); |
- __ RecordWrite(elements, Operand(r4), r5, r6); |
+ __ mov(scratch_value, value); // Preserve the value which is returned. |
+ __ RecordWrite(elements, |
+ address, |
+ scratch_value, |
+ kLRHasNotBeenSaved, |
+ kDontSaveFPRegs, |
+ EMIT_REMEMBERED_SET, |
+ OMIT_SMI_CHECK); |
__ Ret(); |
} |