Commit 4035d55c authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: Bugfix: assert in lithium compile for LMaybeGrowElements.

  port ce1fe78d (r35331)

  original commit message:

BUG=

Review URL: https://codereview.chromium.org/1893173002

Cr-Commit-Position: refs/heads/master@{#35554}
parent 4ea47aa0
......@@ -4363,7 +4363,15 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) {
LOperand* key = instr->key();
if (key->IsConstantOperand()) {
__ mov(ebx, ToImmediate(key, Representation::Smi()));
LConstantOperand* constant_key = LConstantOperand::cast(key);
int32_t int_key = ToInteger32(constant_key);
if (Smi::IsValid(int_key)) {
__ mov(ebx, Immediate(Smi::FromInt(int_key)));
} else {
// We should never get here at runtime because there is a smi check on
// the key before this point.
__ int3();
}
} else {
__ Move(ebx, ToRegister(key));
__ SmiTag(ebx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment