Index: src/arm64/lithium-arm64.cc |
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc |
index c57cb689a042cf8ea9e717bbeb26a3d08db7c9c4..2dfcdb08615f6b69ba721d1d50d19c7d82ce332a 100644 |
--- a/src/arm64/lithium-arm64.cc |
+++ b/src/arm64/lithium-arm64.cc |
@@ -1712,21 +1712,24 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
instr->RequiresHoleCheck()) |
? TempRegister() |
: NULL; |
- |
- LLoadKeyedFixedDouble* result = |
- new(zone()) LLoadKeyedFixedDouble(elements, key, temp); |
- return instr->RequiresHoleCheck() |
- ? AssignEnvironment(DefineAsRegister(result)) |
- : DefineAsRegister(result); |
+ LInstruction* result = DefineAsRegister( |
+ new (zone()) LLoadKeyedFixedDouble(elements, key, temp)); |
+ if (instr->RequiresHoleCheck()) { |
+ result = AssignEnvironment(result); |
+ } |
+ return result; |
} else { |
DCHECK(instr->representation().IsSmiOrTagged() || |
instr->representation().IsInteger32()); |
LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); |
- LLoadKeyedFixed* result = |
- new(zone()) LLoadKeyedFixed(elements, key, temp); |
- return instr->RequiresHoleCheck() |
- ? AssignEnvironment(DefineAsRegister(result)) |
- : DefineAsRegister(result); |
+ LInstruction* result = |
+ DefineAsRegister(new (zone()) LLoadKeyedFixed(elements, key, temp)); |
+ if (instr->RequiresHoleCheck() || |
+ (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && |
+ info()->IsStub())) { |
+ result = AssignEnvironment(result); |
+ } |
+ return result; |
} |
} else { |
DCHECK((instr->representation().IsInteger32() && |