Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 5d72524cfe14f368dfefa8d67678c2a8cc5c3ea7..879fbb82dfcf5d342859776ab8ddee2b67db43a6 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -4000,29 +4000,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
} |
Register object = ToRegister(instr->object()); |
- SmiCheck check_needed = hinstr->value()->IsHeapObject() |
- ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
- |
- ASSERT(!(representation.IsSmi() && |
- instr->value()->IsConstantOperand() && |
- !IsInteger32Constant(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 (!hinstr->value()->type().IsHeapObject()) { |
- Register value = ToRegister(instr->value()); |
- Condition cc = masm()->CheckSmi(value); |
- DeoptimizeIf(cc, 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() || |
+ IsInteger32Constant(LConstantOperand::cast(instr->value()))); |
+ if (representation.IsDouble()) { |
ASSERT(access.IsInobject()); |
ASSERT(!hinstr->has_transition()); |
ASSERT(!hinstr->NeedsWriteBarrier()); |
@@ -4107,7 +4090,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
temp, |
kSaveFPRegs, |
EMIT_REMEMBERED_SET, |
- check_needed); |
+ hinstr->SmiCheckForWriteBarrier()); |
} |
} |