Index: src/arm64/lithium-codegen-arm64.cc |
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc |
index acc647d793c8bb0f020ecc6ab89895decb283ecd..3ec267de3577711215f6f47d5717fef87fa5be29 100644 |
--- a/src/arm64/lithium-codegen-arm64.cc |
+++ b/src/arm64/lithium-codegen-arm64.cc |
@@ -3614,6 +3614,21 @@ 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) 1. Otherwise it needs to bail out. |
+ __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
+ __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); |
Jakob Kummerow
2015/04/23 13:40:00
nit: s/ldr/Ldr/ (always use MacroAssembler instruc
mvstanton
2015/04/27 07:57:12
Done.
|
+ __ Cmp(result, Operand(Smi::FromInt(1))); |
+ DeoptimizeIf(ne, instr, Deoptimizer::kHole); |
+ } |
+ __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
+ __ bind(&done); |
Jakob Kummerow
2015/04/23 13:40:00
nit: s/bind/Bind/
mvstanton
2015/04/27 07:57:12
Done.
|
} |
} |