| Index: src/arm64/lithium-codegen-arm64.cc
|
| diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc
|
| index 41665e75b4821b14e86feccbcade63653a8c6d1a..13da0b99b1fad3d81514f65db56d079c7c6d1480 100644
|
| --- a/src/arm64/lithium-codegen-arm64.cc
|
| +++ b/src/arm64/lithium-codegen-arm64.cc
|
| @@ -3615,6 +3615,22 @@ void LCodeGen::DoLoadKeyedFixed(LLoadKeyedFixed* instr) {
|
| DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr,
|
| Deoptimizer::kHole);
|
| }
|
| + } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
|
| + DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
|
| + Label done;
|
| + __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
|
| + __ B(ne, &done);
|
| + if (info()->IsStub()) {
|
| + // A stub can safely convert the hole to undefined only if the array
|
| + // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise
|
| + // it needs to bail out.
|
| + __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
|
| + __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
|
| + __ Cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid)));
|
| + DeoptimizeIf(ne, instr, Deoptimizer::kHole);
|
| + }
|
| + __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
|
| + __ Bind(&done);
|
| }
|
| }
|
|
|
|
|