Chromium Code Reviews| Index: src/arm/lithium-codegen-arm.cc |
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
| index 8cbdf99106c80b06cda784b4be9a84ff93fb6ef7..20b442ca68b5ad69adc84b9d8091dd5ea1060ede 100644 |
| --- a/src/arm/lithium-codegen-arm.cc |
| +++ b/src/arm/lithium-codegen-arm.cc |
| @@ -3347,6 +3347,22 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) { |
| __ cmp(result, scratch); |
| DeoptimizeIf(eq, instr, Deoptimizer::kHole); |
| } |
| + } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
| + DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
| + Label done; |
| + __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
| + __ cmp(result, scratch); |
| + __ 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(scratch, Heap::kArrayProtectorRootIndex); |
|
balazs.kilvady
2015/04/23 16:24:37
The result register should be used instead of scra
mvstanton
2015/04/27 07:57:12
Done.
|
| + __ ldr(scratch, FieldMemOperand(result, Cell::kValueOffset)); |
| + __ cmp(scratch, Operand(Smi::FromInt(1))); |
| + DeoptimizeIf(ne, instr, Deoptimizer::kHole); |
| + } |
| + __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
| + __ bind(&done); |
| } |
| } |