| Index: src/crankshaft/arm/lithium-codegen-arm.cc
|
| diff --git a/src/crankshaft/arm/lithium-codegen-arm.cc b/src/crankshaft/arm/lithium-codegen-arm.cc
|
| index b179a18ff105bb71e2acedd2c3a194fb9c89b036..45e13850562a967bf45f8750c930a84b3236f658 100644
|
| --- a/src/crankshaft/arm/lithium-codegen-arm.cc
|
| +++ b/src/crankshaft/arm/lithium-codegen-arm.cc
|
| @@ -4192,7 +4192,15 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) {
|
|
|
| LOperand* key = instr->key();
|
| if (key->IsConstantOperand()) {
|
| - __ Move(r3, Operand(ToSmi(LConstantOperand::cast(key))));
|
| + LConstantOperand* constant_key = LConstantOperand::cast(key);
|
| + int32_t int_key = ToInteger32(constant_key);
|
| + if (Smi::IsValid(int_key)) {
|
| + __ mov(r3, Operand(Smi::FromInt(int_key)));
|
| + } else {
|
| + // We should never get here at runtime because there is a smi check on
|
| + // the key before this point.
|
| + __ stop("expected smi");
|
| + }
|
| } else {
|
| __ Move(r3, ToRegister(key));
|
| __ SmiTag(r3);
|
|
|