Chromium Code Reviews

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

Issue 1893173002: X87: Bugfix: assert in lithium compile for LMaybeGrowElements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-codegen-x87.cc
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
index 485b62239873c95a9548441d3e237532f5bb88dd..14c5617c84a6ed9dd17f8ef550173c5ba2d5ea86 100644
--- a/src/crankshaft/x87/lithium-codegen-x87.cc
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine