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

Unified Diff: src/crankshaft/ia32/lithium-codegen-ia32.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/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/ia32/lithium-codegen-ia32.cc
diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc
index df459fc23f0d1e8bd9d8c68aca212fadf2dc4628..91688061e1ea1dfb7016c64375153e121c2a59be 100644
--- a/src/crankshaft/ia32/lithium-codegen-ia32.cc
+++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc
@@ -3974,7 +3974,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);
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698