Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index e000feff1d2fcad336ddd1805698286df3018c1a..0bcfd2335abcd72c8069577d63bc22cca5b31ba9 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -3158,6 +3158,13 @@ void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { |
Register elements = ToRegister(instr->object()); |
Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; |
+ // This instruction cannot handle the FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS |
+ // conversion, so it deopts in that case. |
+ if (instr->hydrogen()->ValueNeedsSmiCheck()) { |
+ Condition cc = masm()->CheckSmi(value); |
+ DeoptimizeIf(NegateCondition(cc), instr->environment()); |
+ } |
+ |
// Do the store. |
if (instr->key()->IsConstantOperand()) { |
ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |