| Index: src/mips/ic-mips.cc
|
| diff --git a/src/mips/ic-mips.cc b/src/mips/ic-mips.cc
|
| index 9813da4a2b8d33b48abdd367921138a959dfcad4..0fe044a6c5a02dfc66fa51b02748672122a61eba 100644
|
| --- a/src/mips/ic-mips.cc
|
| +++ b/src/mips/ic-mips.cc
|
| @@ -1180,6 +1180,22 @@ static void KeyedStoreGenerateGenericHelper(
|
| __ Branch(fast_double, ne, elements_map,
|
| Operand(masm->isolate()->factory()->fixed_array_map()));
|
| }
|
| +
|
| + // HOLECHECK: guards "A[i] = V"
|
| + // We have to go to the runtime if the current value is the hole because
|
| + // there may be a callback on the element.
|
| + Label holecheck_passed1;
|
| + __ Addu(address, elements, FixedArray::kHeaderSize - kHeapObjectTag);
|
| + __ sll(at, key, kPointerSizeLog2 - kSmiTagSize);
|
| + __ addu(address, address, at);
|
| + __ lw(scratch_value, MemOperand(address));
|
| + __ Branch(&holecheck_passed1, ne, scratch_value,
|
| + Operand(masm->isolate()->factory()->the_hole_value()));
|
| + __ JumpIfDictionaryInPrototypeChain(receiver, elements_map, scratch_value,
|
| + slow);
|
| +
|
| + __ bind(&holecheck_passed1);
|
| +
|
| // Smi stores don't require further checks.
|
| Label non_smi_value;
|
| __ JumpIfNotSmi(value, &non_smi_value);
|
| @@ -1230,6 +1246,21 @@ static void KeyedStoreGenerateGenericHelper(
|
| __ LoadRoot(at, Heap::kFixedDoubleArrayMapRootIndex);
|
| __ Branch(slow, ne, elements_map, Operand(at));
|
| }
|
| +
|
| + // HOLECHECK: guards "A[i] double hole?"
|
| + // We have to see if the double version of the hole is present. If so
|
| + // go to the runtime.
|
| + __ Addu(address, elements,
|
| + Operand(FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32)
|
| + - kHeapObjectTag));
|
| + __ sll(at, key, kPointerSizeLog2);
|
| + __ addu(address, address, at);
|
| + __ lw(scratch_value, MemOperand(address));
|
| + __ Branch(&fast_double_without_map_check, ne, scratch_value,
|
| + Operand(kHoleNanUpper32));
|
| + __ JumpIfDictionaryInPrototypeChain(receiver, elements_map, scratch_value,
|
| + slow);
|
| +
|
| __ bind(&fast_double_without_map_check);
|
| __ StoreNumberToDoubleElements(value,
|
| key,
|
|
|