Chromium Code Reviews| Index: src/x64/ic-x64.cc |
| diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc |
| index 359b595a8dc329ad1f7b3d0137a89188ec2e2ae5..4541d23bceb1b0d4af3608d707e9431b5e73dedb 100644 |
| --- a/src/x64/ic-x64.cc |
| +++ b/src/x64/ic-x64.cc |
| @@ -692,6 +692,20 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
| // rax: value |
| // rbx: receiver's elements array (a FixedArray) |
| // rcx: index |
| + |
| + if (FLAG_smi_only_arrays) { |
|
William Hesse
2011/09/23 13:25:22
The JumpIfNotSmi can be moved above the guard, tog
Yang
2011/09/23 14:19:12
Done.
|
| + Label not_smi_only; |
| + // Make sure the elements are smi-only. |
| + __ movq(rdi, FieldOperand(rdx, HeapObject::kMapOffset)); |
| + __ CheckFastSmiOnlyElements(rdi, ¬_smi_only, Label::kNear); |
| + // Non-smis need to call into the runtime if the array is smi only. |
| + __ JumpIfNotSmi(rax, &slow); |
| + __ movq(FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize), |
| + rax); |
| + __ ret(0); |
| + __ bind(¬_smi_only); |
| + } |
| + |
| Label non_smi_value; |
| __ movq(FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize), |
| rax); |