Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 9fd0ae532cc9d29931dbcd821297e8c3b2becbc5..525944a3db2e42a4f4cbd6a15f4a58917dc9e220 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -3978,30 +3978,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
} |
Register object = ToRegister(instr->object()); |
- SmiCheck check_needed = |
- instr->hydrogen()->value()->IsHeapObject() |
- ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
- |
- ASSERT(!(representation.IsSmi() && |
- instr->value()->IsConstantOperand() && |
- !IsSmi(LConstantOperand::cast(instr->value())))); |
- if (representation.IsHeapObject()) { |
- if (instr->value()->IsConstantOperand()) { |
- LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
- if (chunk_->LookupConstant(operand_value)->HasSmiValue()) { |
- DeoptimizeIf(no_condition, instr->environment()); |
- } |
- } else { |
- if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
- Register value = ToRegister(instr->value()); |
- __ test(value, Immediate(kSmiTagMask)); |
- DeoptimizeIf(zero, instr->environment()); |
+ __ AssertNotSmi(object); |
- // 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()); |
@@ -4068,7 +4050,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
temp, |
kSaveFPRegs, |
EMIT_REMEMBERED_SET, |
- check_needed); |
+ instr->hydrogen()->SmiCheckForWriteBarrier()); |
} |
} |