| Index: src/ia32/ic-ia32.cc
|
| diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc
|
| index e81357c4ffd3849537b1f25ad10b77515d455f4f..c2181e7134f3838a9d1dafc70d2c596f0c6635c1 100644
|
| --- a/src/ia32/ic-ia32.cc
|
| +++ b/src/ia32/ic-ia32.cc
|
| @@ -810,6 +810,19 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
| // ecx: key (a smi)
|
| // edx: receiver
|
| // edi: FixedArray receiver->elements
|
| +
|
| + if (FLAG_smi_only_arrays) {
|
| + Label not_smi_only;
|
| + // Make sure the elements are smi-only.
|
| + __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
|
| + __ CheckFastSmiOnlyElements(ebx, ¬_smi_only, Label::kNear);
|
| + // Non-smis need to call into the runtime if the array is smi only.
|
| + __ JumpIfNotSmi(eax, &slow);
|
| + __ mov(CodeGenerator::FixedArrayElementOperand(edi, ecx), eax);
|
| + __ ret(0);
|
| + __ bind(¬_smi_only);
|
| + }
|
| +
|
| __ mov(CodeGenerator::FixedArrayElementOperand(edi, ecx), eax);
|
|
|
| // Update write barrier for the elements array address.
|
|
|