Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index 57d75258154ef4a29bb512a49450ed84634525fa..9ed53293e31fadf285020922c22b9007c2101de7 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -1890,6 +1890,12 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
if (from.IsSmi()) { |
if (to.IsTagged()) { |
LOperand* value = UseRegister(instr->value()); |
+ // For now, always deopt on hole. |
+ if (instr->value()->IsLoadKeyed() && |
+ HLoadKeyed::cast(instr->value())->UsesMustHandleHole()) { |
+ return AssignEnvironment( |
+ DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); |
+ } |
return DefineSameAsFirst(new(zone()) LDummyUse(value)); |
} |
from = Representation::Tagged(); |
@@ -1902,9 +1908,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
return AssignEnvironment(DefineAsRegister(res)); |
} else if (to.IsSmi()) { |
HValue* val = instr->value(); |
- LOperand* value = UseRegisterAtStart(val); |
+ LOperand* value = UseRegister(val); |
return AssignEnvironment( |
- DefineSameAsFirst(new(zone()) LCheckSmi(value))); |
+ DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); |
} else { |
ASSERT(to.IsInteger32()); |
LOperand* value = NULL; |