Commit 75b03d0c authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: Bugfix: assert in lithium compile for LMaybeGrowElements

Port ce1fe78d

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com
BUG=chromium:585041
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35337}
parent 57049242
......@@ -4429,7 +4429,15 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) {
LOperand* key = instr->key();
if (key->IsConstantOperand()) {
__ LoadSmiLiteral(r6, ToSmi(LConstantOperand::cast(key)));
LConstantOperand* constant_key = LConstantOperand::cast(key);
int32_t int_key = ToInteger32(constant_key);
if (Smi::IsValid(int_key)) {
__ LoadSmiLiteral(r6, 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 {
__ SmiTag(r6, ToRegister(key));
}
......
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