| 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 __ bind(&fast_object_without_map_check); | 702 __ bind(&fast_object_without_map_check); |
| 703 // Smi stores don't require further checks. | 703 // Smi stores don't require further checks. |
| 704 Label non_smi_value; | 704 Label non_smi_value; |
| 705 __ JumpIfNotSmi(rax, &non_smi_value); | 705 __ JumpIfNotSmi(rax, &non_smi_value); |
| 706 // It's irrelevant whether array is smi-only or not when writing a smi. | 706 // It's irrelevant whether array is smi-only or not when writing a smi. |
| 707 __ movq(FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize), | 707 __ movq(FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize), |
| 708 rax); | 708 rax); |
| 709 __ ret(0); | 709 __ ret(0); |
| 710 | 710 |
| 711 __ bind(&non_smi_value); | 711 __ bind(&non_smi_value); |
| 712 if (FLAG_smi_only_arrays) { | 712 // Writing a non-smi, check whether array allows non-smi elements. |
| 713 // Writing a non-smi, check whether array allows non-smi elements. | 713 // r9: receiver's map |
| 714 // r9: receiver's map | 714 __ CheckFastObjectElements(r9, &slow, Label::kNear); |
| 715 __ CheckFastObjectElements(r9, &slow, Label::kNear); | |
| 716 } | |
| 717 __ lea(rcx, | 715 __ lea(rcx, |
| 718 FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize)); | 716 FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize)); |
| 719 __ movq(Operand(rcx, 0), rax); | 717 __ movq(Operand(rcx, 0), rax); |
| 720 __ movq(rdx, rax); | 718 __ movq(rdx, rax); |
| 721 __ RecordWrite( | 719 __ RecordWrite( |
| 722 rbx, rcx, rdx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 720 rbx, rcx, rdx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
| 723 __ ret(0); | 721 __ ret(0); |
| 724 | 722 |
| 725 __ bind(&fast_double_with_map_check); | 723 __ bind(&fast_double_with_map_check); |
| 726 // Check for fast double array case. If this fails, call through to the | 724 // Check for fast double array case. If this fails, call through to the |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1699 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1697 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
| 1700 ? not_zero | 1698 ? not_zero |
| 1701 : zero; | 1699 : zero; |
| 1702 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1700 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1703 } | 1701 } |
| 1704 | 1702 |
| 1705 | 1703 |
| 1706 } } // namespace v8::internal | 1704 } } // namespace v8::internal |
| 1707 | 1705 |
| 1708 #endif // V8_TARGET_ARCH_X64 | 1706 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |