| Index: src/crankshaft/mips/lithium-codegen-mips.cc
|
| diff --git a/src/crankshaft/mips/lithium-codegen-mips.cc b/src/crankshaft/mips/lithium-codegen-mips.cc
|
| index d578df6e8af9b8fd69d98d6468ce625e081bdbde..0bcf64a74a95d93606977a3a23f541262f81a4ab 100644
|
| --- a/src/crankshaft/mips/lithium-codegen-mips.cc
|
| +++ b/src/crankshaft/mips/lithium-codegen-mips.cc
|
| @@ -4158,7 +4158,15 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) {
|
|
|
| LOperand* key = instr->key();
|
| if (key->IsConstantOperand()) {
|
| - __ li(a3, Operand(ToSmi(LConstantOperand::cast(key))));
|
| + LConstantOperand* constant_key = LConstantOperand::cast(key);
|
| + int32_t int_key = ToInteger32(constant_key);
|
| + if (Smi::IsValid(int_key)) {
|
| + __ li(a3, 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 {
|
| __ mov(a3, ToRegister(key));
|
| __ SmiTag(a3);
|
|
|