Index: src/arm/lithium-codegen-arm.cc |
=================================================================== |
--- src/arm/lithium-codegen-arm.cc (revision 9605) |
+++ src/arm/lithium-codegen-arm.cc (working copy) |
@@ -2251,13 +2251,19 @@ |
__ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
// Cells are always in the remembered set. |
- __ RecordWriteField(scratch, |
- JSGlobalPropertyCell::kValueOffset, |
- value, |
- scratch2, |
- kLRHasBeenSaved, |
- kSaveFPRegs, |
- OMIT_REMEMBERED_SET); |
+ if (instr->hydrogen()->NeedsWriteBarrier()) { |
+ HType type = instr->hydrogen()->value()->type(); |
+ SmiCheck check_needed = |
+ type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
+ __ RecordWriteField(scratch, |
+ JSGlobalPropertyCell::kValueOffset, |
+ value, |
+ scratch2, |
+ kLRHasBeenSaved, |
+ kSaveFPRegs, |
+ OMIT_REMEMBERED_SET, |
+ check_needed); |
+ } |
} |
@@ -2285,13 +2291,18 @@ |
Register value = ToRegister(instr->value()); |
MemOperand target = ContextOperand(context, instr->slot_index()); |
__ str(value, target); |
- if (instr->needs_write_barrier()) { |
+ if (instr->hydrogen()->NeedsWriteBarrier()) { |
+ HType type = instr->hydrogen()->value()->type(); |
+ SmiCheck check_needed = |
+ type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
__ RecordWriteContextSlot(context, |
target.offset(), |
value, |
scratch0(), |
kLRHasBeenSaved, |
- kSaveFPRegs); |
+ kSaveFPRegs, |
+ EMIT_REMEMBERED_SET, |
+ check_needed); |
} |
} |
@@ -3297,21 +3308,36 @@ |
} |
// Do the store. |
+ HType type = instr->hydrogen()->value()->type(); |
+ SmiCheck check_needed = |
+ type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
if (instr->is_in_object()) { |
__ str(value, FieldMemOperand(object, offset)); |
- if (instr->needs_write_barrier()) { |
+ if (instr->hydrogen()->NeedsWriteBarrier()) { |
// Update the write barrier for the object for in-object properties. |
- __ RecordWriteField( |
- object, offset, value, scratch, kLRHasBeenSaved, kSaveFPRegs); |
+ __ RecordWriteField(object, |
+ offset, |
+ value, |
+ scratch, |
+ kLRHasBeenSaved, |
+ kSaveFPRegs, |
+ EMIT_REMEMBERED_SET, |
+ check_needed); |
} |
} else { |
__ ldr(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
__ str(value, FieldMemOperand(scratch, offset)); |
- if (instr->needs_write_barrier()) { |
+ if (instr->hydrogen()->NeedsWriteBarrier()) { |
// Update the write barrier for the properties array. |
// object is used as a scratch register. |
- __ RecordWriteField( |
- scratch, offset, value, object, kLRHasBeenSaved, kSaveFPRegs); |
+ __ RecordWriteField(scratch, |
+ offset, |
+ value, |
+ object, |
+ kLRHasBeenSaved, |
+ kSaveFPRegs, |
+ EMIT_REMEMBERED_SET, |
+ check_needed); |
} |
} |
} |
@@ -3362,9 +3388,18 @@ |
} |
if (instr->hydrogen()->NeedsWriteBarrier()) { |
+ HType type = instr->hydrogen()->value()->type(); |
+ SmiCheck check_needed = |
+ type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
// Compute address of modified element and store it into key register. |
__ add(key, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
- __ RecordWrite(elements, key, value, kLRHasBeenSaved, kSaveFPRegs); |
+ __ RecordWrite(elements, |
+ key, |
+ value, |
+ kLRHasBeenSaved, |
+ kSaveFPRegs, |
+ EMIT_REMEMBERED_SET, |
+ check_needed); |
} |
} |
@@ -4349,8 +4384,9 @@ |
false_label, |
input, |
instr->type_literal()); |
- |
- EmitBranch(true_block, false_block, final_branch_condition); |
+ if (final_branch_condition != kNoCondition) { |
+ EmitBranch(true_block, false_block, final_branch_condition); |
+ } |
} |
@@ -4420,9 +4456,7 @@ |
final_branch_condition = eq; |
} else { |
- final_branch_condition = ne; |
__ b(false_label); |
- // A dead branch instruction will be generated after this point. |
} |
return final_branch_condition; |