Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index 135c4cf3f9fe19f5c6d0caa52f9df677e199b4d6..51845724cebd2a2c9dc09ce3d6d379bce9caf827 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -1815,6 +1815,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(); |
@@ -1830,9 +1836,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 = UseRegister(instr->value()); |
@@ -1937,13 +1943,13 @@ LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { |
LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { |
LOperand* value = UseRegisterAtStart(instr->value()); |
- return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); |
+ return AssignEnvironment(new(zone()) LCheckSmi(value)); |
} |
LInstruction* LChunkBuilder::DoCheckSmiOrInt32(HCheckSmiOrInt32* instr) { |
LOperand* value = UseRegisterAtStart(instr->value()); |
- return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); |
+ return AssignEnvironment(new(zone()) LCheckSmi(value)); |
} |