Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index f1deb387059d6071fc698ce172b3199cf3d2be94..69e36f8c862e80ab9efc3f61405fb01ad6727d86 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -4056,23 +4056,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
return; |
} |
- SmiCheck check_needed = |
- instr->hydrogen()->value()->IsHeapObject() |
- ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
+ __ AssertNotSmi(object); |
- ASSERT(!(representation.IsSmi() && |
- instr->value()->IsConstantOperand() && |
- !IsSmi(LConstantOperand::cast(instr->value())))); |
- if (representation.IsHeapObject()) { |
- Register value = ToRegister(instr->value()); |
- if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
- __ SmiTst(value, scratch); |
- DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); |
- |
- // We know now that value is not a smi, so we can omit the check below. |
- check_needed = OMIT_SMI_CHECK; |
- } |
- } else if (representation.IsDouble()) { |
+ ASSERT(!representation.IsSmi() || |
+ !instr->value()->IsConstantOperand() || |
+ IsSmi(LConstantOperand::cast(instr->value()))); |
+ if (representation.IsDouble()) { |
ASSERT(access.IsInobject()); |
ASSERT(!instr->hydrogen()->has_transition()); |
ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
@@ -4114,7 +4103,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
GetRAState(), |
kSaveFPRegs, |
EMIT_REMEMBERED_SET, |
- check_needed); |
+ instr->hydrogen()->SmiCheckForWriteBarrier()); |
} |
} else { |
__ lw(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
@@ -4130,7 +4119,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
GetRAState(), |
kSaveFPRegs, |
EMIT_REMEMBERED_SET, |
- check_needed); |
+ instr->hydrogen()->SmiCheckForWriteBarrier()); |
} |
} |
} |