Index: src/arm/lithium-codegen-arm.cc |
=================================================================== |
--- src/arm/lithium-codegen-arm.cc (revision 9327) |
+++ src/arm/lithium-codegen-arm.cc (working copy) |
@@ -214,13 +214,11 @@ |
// Load parameter from stack. |
__ ldr(r0, MemOperand(fp, parameter_offset)); |
// Store it in the context. |
- __ mov(r1, Operand(Context::SlotOffset(var->index()))); |
- __ str(r0, MemOperand(cp, r1)); |
- // Update the write barrier. This clobbers all involved |
- // registers, so we have to use two more registers to avoid |
- // clobbering cp. |
- __ mov(r2, Operand(cp)); |
- __ RecordWrite(r2, Operand(r1), r3, r0); |
+ MemOperand target = ContextOperand(cp, var->index()); |
+ __ str(r0, target); |
+ // Update the write barrier. This clobbers r3 and r0. |
+ __ RecordWriteContextSlot( |
+ cp, target.offset(), r0, r3, kLRHasBeenSaved, kSaveFPRegs); |
} |
} |
Comment(";;; End allocate local context"); |
@@ -747,7 +745,7 @@ |
int deoptimization_index) { |
ASSERT(expected_safepoint_kind_ == kind); |
- const ZoneList<LOperand*>* operands = pointers->operands(); |
+ const ZoneList<LOperand*>* operands = pointers->GetNormalizedOperands(); |
Safepoint safepoint = safepoints_.DefineSafepoint(masm(), |
kind, arguments, deoptimization_index); |
for (int i = 0; i < operands->length(); i++) { |
@@ -2221,6 +2219,7 @@ |
void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
Register value = ToRegister(instr->InputAt(0)); |
Register scratch = scratch0(); |
+ Register scratch2 = ToRegister(instr->TempAt(0)); |
// Load the cell. |
__ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); |
@@ -2230,7 +2229,6 @@ |
// to update the property details in the property dictionary to mark |
// it as no longer deleted. |
if (instr->hydrogen()->check_hole_value()) { |
- Register scratch2 = ToRegister(instr->TempAt(0)); |
__ ldr(scratch2, |
FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
__ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
@@ -2240,6 +2238,15 @@ |
// Store the value. |
__ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
+ |
+ // Cells are always in the remembered set. |
+ __ RecordWriteField(scratch, |
+ JSGlobalPropertyCell::kValueOffset, |
+ value, |
+ scratch2, |
+ kLRHasBeenSaved, |
+ kSaveFPRegs, |
+ OMIT_REMEMBERED_SET); |
} |
@@ -2265,10 +2272,15 @@ |
void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
Register context = ToRegister(instr->context()); |
Register value = ToRegister(instr->value()); |
- __ str(value, ContextOperand(context, instr->slot_index())); |
+ MemOperand target = ContextOperand(context, instr->slot_index()); |
+ __ str(value, target); |
if (instr->needs_write_barrier()) { |
- int offset = Context::SlotOffset(instr->slot_index()); |
- __ RecordWrite(context, Operand(offset), value, scratch0()); |
+ __ RecordWriteContextSlot(context, |
+ target.offset(), |
+ value, |
+ scratch0(), |
+ kLRHasBeenSaved, |
+ kSaveFPRegs); |
} |
} |
@@ -3280,7 +3292,8 @@ |
__ str(value, FieldMemOperand(object, offset)); |
if (instr->needs_write_barrier()) { |
// Update the write barrier for the object for in-object properties. |
- __ RecordWrite(object, Operand(offset), value, scratch); |
+ __ RecordWriteField( |
+ object, offset, value, scratch, kLRHasBeenSaved, kSaveFPRegs); |
} |
} else { |
__ ldr(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
@@ -3288,7 +3301,8 @@ |
if (instr->needs_write_barrier()) { |
// Update the write barrier for the properties array. |
// object is used as a scratch register. |
- __ RecordWrite(scratch, Operand(offset), value, object); |
+ __ RecordWriteField( |
+ scratch, offset, value, object, kLRHasBeenSaved, kSaveFPRegs); |
} |
} |
} |
@@ -3334,7 +3348,7 @@ |
if (instr->hydrogen()->NeedsWriteBarrier()) { |
// Compute address of modified element and store it into key register. |
__ add(key, scratch, Operand(FixedArray::kHeaderSize)); |
- __ RecordWrite(elements, key, value); |
+ __ RecordWrite(elements, key, value, kLRHasBeenSaved, kSaveFPRegs); |
} |
} |