Chromium Code Reviews| Index: src/mips64/lithium-codegen-mips64.cc |
| diff --git a/src/mips64/lithium-codegen-mips64.cc b/src/mips64/lithium-codegen-mips64.cc |
| index f144eaa5c3cef631aa45e86bb6035b6ce90b1648..20d15400062cba1c0dcb8e1a871ff55cfcef6c22 100644 |
| --- a/src/mips64/lithium-codegen-mips64.cc |
| +++ b/src/mips64/lithium-codegen-mips64.cc |
| @@ -3333,6 +3333,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)); |
|
paul.l...
2015/04/23 15:34:23
nit: This should probably be 'ld'. I say 'probably
mvstanton
2015/04/27 07:57:13
Done.
|
| + DeoptimizeIf(ne, instr, Deoptimizer::kHole, scratch, |
| + Operand(Smi::FromInt(1))); |
| + } |
| + __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
| + __ bind(&done); |
| } |
| } |