| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 __ j(not_equal, &fast_double_with_map_check); | 826 __ j(not_equal, &fast_double_with_map_check); |
| 827 __ bind(&fast_object_without_map_check); | 827 __ bind(&fast_object_without_map_check); |
| 828 // Smi stores don't require further checks. | 828 // Smi stores don't require further checks. |
| 829 Label non_smi_value; | 829 Label non_smi_value; |
| 830 __ JumpIfNotSmi(eax, &non_smi_value); | 830 __ JumpIfNotSmi(eax, &non_smi_value); |
| 831 // It's irrelevant whether array is smi-only or not when writing a smi. | 831 // It's irrelevant whether array is smi-only or not when writing a smi. |
| 832 __ mov(CodeGenerator::FixedArrayElementOperand(ebx, ecx), eax); | 832 __ mov(CodeGenerator::FixedArrayElementOperand(ebx, ecx), eax); |
| 833 __ ret(0); | 833 __ ret(0); |
| 834 | 834 |
| 835 __ bind(&non_smi_value); | 835 __ bind(&non_smi_value); |
| 836 if (FLAG_smi_only_arrays) { | 836 // Escape to slow case when writing non-smi into smi-only array. |
| 837 // Escape to slow case when writing non-smi into smi-only array. | 837 __ mov(edi, FieldOperand(edx, HeapObject::kMapOffset)); |
| 838 __ mov(edi, FieldOperand(edx, HeapObject::kMapOffset)); | 838 __ CheckFastObjectElements(edi, &slow, Label::kNear); |
| 839 __ CheckFastObjectElements(edi, &slow, Label::kNear); | |
| 840 } | |
| 841 | 839 |
| 842 // Fast elements array, store the value to the elements backing store. | 840 // Fast elements array, store the value to the elements backing store. |
| 843 __ mov(CodeGenerator::FixedArrayElementOperand(ebx, ecx), eax); | 841 __ mov(CodeGenerator::FixedArrayElementOperand(ebx, ecx), eax); |
| 844 // Update write barrier for the elements array address. | 842 // Update write barrier for the elements array address. |
| 845 __ mov(edx, eax); // Preserve the value which is returned. | 843 __ mov(edx, eax); // Preserve the value which is returned. |
| 846 __ RecordWriteArray( | 844 __ RecordWriteArray( |
| 847 ebx, edx, ecx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 845 ebx, edx, ecx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
| 848 __ ret(0); | 846 __ ret(0); |
| 849 | 847 |
| 850 __ bind(&fast_double_with_map_check); | 848 __ bind(&fast_double_with_map_check); |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1678 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1676 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
| 1679 ? not_zero | 1677 ? not_zero |
| 1680 : zero; | 1678 : zero; |
| 1681 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1679 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1682 } | 1680 } |
| 1683 | 1681 |
| 1684 | 1682 |
| 1685 } } // namespace v8::internal | 1683 } } // namespace v8::internal |
| 1686 | 1684 |
| 1687 #endif // V8_TARGET_ARCH_IA32 | 1685 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |