Chromium Code Reviews| Index: src/ia32/ic-ia32.cc |
| diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc |
| index f8e4ea53d0f78cb32f63e86b30343f85c857f42c..8181b8a48834b265bcecfef096dd3ff16de6e44f 100644 |
| --- a/src/ia32/ic-ia32.cc |
| +++ b/src/ia32/ic-ia32.cc |
| @@ -733,6 +733,18 @@ static void KeyedStoreGenerateGenericHelper( |
| __ cmp(edi, masm->isolate()->factory()->fixed_array_map()); |
| __ j(not_equal, fast_double); |
| } |
| + |
| + // HOLECHECK: guards "A[i] = V" |
| + // We have to go to the runtime if the current value is undefined because |
|
danno
2013/10/30 12:17:45
nit: the hole, not undefined. It could be some oth
mvstanton
2013/10/30 18:22:28
Done.
|
| + // there may be a callback on the element |
| + Label holecheck_passed1; |
| + __ cmp(CodeGenerator::FixedArrayElementOperand(ebx, ecx), |
| + masm->isolate()->factory()->the_hole_value()); |
| + __ j(not_equal, &holecheck_passed1); |
| + __ HasElementCallbacksInPrototypeChain(edx, ebx, slow); |
| + |
| + __ bind(&holecheck_passed1); |
| + |
| // Smi stores don't require further checks. |
| Label non_smi_value; |
| __ JumpIfNotSmi(eax, &non_smi_value); |
| @@ -773,6 +785,15 @@ static void KeyedStoreGenerateGenericHelper( |
| // If the value is a number, store it as a double in the FastDoubleElements |
| // array. |
| } |
| + |
| + // 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. |
| + uint32_t offset = FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32); |
| + __ cmp(FieldOperand(ebx, ecx, times_4, offset), Immediate(kHoleNanUpper32)); |
| + __ j(not_equal, &fast_double_without_map_check); |
| + __ HasElementCallbacksInPrototypeChain(edx, ebx, slow); |
| + |
| __ bind(&fast_double_without_map_check); |
| __ StoreNumberToDoubleElements(eax, ebx, ecx, edi, xmm0, |
| &transition_double_elements, false); |