Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: src/crankshaft/mips64/lithium-codegen-mips64.cc

Issue 1854423003: Bugfix: assert in lithium compile for LMaybeGrowElements (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed test bug. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | test/mjsunit/regress/regress-585041.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/mips64/lithium-codegen-mips64.cc
diff --git a/src/crankshaft/mips64/lithium-codegen-mips64.cc b/src/crankshaft/mips64/lithium-codegen-mips64.cc
index d14efafd4d6f55c3ff5cd7d33f50ff40bfbb82b8..55499973150c88d3fee8e48b645ef1981d3d7bec 100644
--- a/src/crankshaft/mips64/lithium-codegen-mips64.cc
+++ b/src/crankshaft/mips64/lithium-codegen-mips64.cc
@@ -4390,7 +4390,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);
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | test/mjsunit/regress/regress-585041.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698