Chromium Code Reviews| Index: src/mips/lithium-codegen-mips.cc |
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
| index 5c0fa9106afbcdfe79c78ad2fb92aaa67fc15b4b..3e7f86ff332d098b3179bd5cc1cb643811443379 100644 |
| --- a/src/mips/lithium-codegen-mips.cc |
| +++ b/src/mips/lithium-codegen-mips.cc |
| @@ -3284,6 +3284,21 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) { |
| __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
| DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch)); |
| } |
| + } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
| + DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
| + Label done; |
| + __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
| + __ Branch(&done, ne, result, Operand(scratch)); |
| + 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:13
Done.
|
| + __ lw(scratch, FieldMemOperand(result, Cell::kValueOffset)); |
| + DeoptimizeIf(ne, instr, Deoptimizer::kHole, scratch, |
| + Operand(Smi::FromInt(1))); |
| + } |
| + __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
| + __ bind(&done); |
| } |
| } |