Index: src/mips64/lithium-mips64.cc |
diff --git a/src/mips64/lithium-mips64.cc b/src/mips64/lithium-mips64.cc |
index 0c01128d579c4f38f9f0667e7160574eb3b2769d..ee32dcef4ebb84c8ae4672759004308ff61d924f 100644 |
--- a/src/mips64/lithium-mips64.cc |
+++ b/src/mips64/lithium-mips64.cc |
@@ -2180,14 +2180,21 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); |
} |
- if ((instr->is_external() || instr->is_fixed_typed_array()) ? |
- // see LCodeGen::DoLoadKeyedExternalArray |
- ((elements_kind == EXTERNAL_UINT32_ELEMENTS || |
- elements_kind == UINT32_ELEMENTS) && |
- !instr->CheckFlag(HInstruction::kUint32)) : |
- // see LCodeGen::DoLoadKeyedFixedDoubleArray and |
- // LCodeGen::DoLoadKeyedFixedArray |
- instr->RequiresHoleCheck()) { |
+ bool needs_environment; |
+ if (instr->is_external() || instr->is_fixed_typed_array()) { |
+ // see LCodeGen::DoLoadKeyedExternalArray |
+ needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS || |
+ elements_kind == UINT32_ELEMENTS) && |
+ !instr->CheckFlag(HInstruction::kUint32); |
+ } else { |
+ // see LCodeGen::DoLoadKeyedFixedDoubleArray and |
+ // LCodeGen::DoLoadKeyedFixedArray |
+ needs_environment = |
+ instr->RequiresHoleCheck() || |
+ (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub()); |
+ } |
+ |
+ if (needs_environment) { |
result = AssignEnvironment(result); |
} |
return result; |