OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3707 // Get the value at the masked, scaled index. | 3707 // Get the value at the masked, scaled index. |
3708 const int kValueOffset = | 3708 const int kValueOffset = |
3709 SeededNumberDictionary::kElementsStartOffset + kPointerSize; | 3709 SeededNumberDictionary::kElementsStartOffset + kPointerSize; |
3710 movq(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset)); | 3710 movq(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset)); |
3711 } | 3711 } |
3712 | 3712 |
3713 | 3713 |
3714 void MacroAssembler::LoadAllocationTopHelper(Register result, | 3714 void MacroAssembler::LoadAllocationTopHelper(Register result, |
3715 Register scratch, | 3715 Register scratch, |
3716 AllocationFlags flags) { | 3716 AllocationFlags flags) { |
3717 ExternalReference new_space_allocation_top = | 3717 ExternalReference allocation_top = ((flags & PRETENURE) != 0) ? |
| 3718 ExternalReference::old_pointer_space_allocation_top_address(isolate()) : |
3718 ExternalReference::new_space_allocation_top_address(isolate()); | 3719 ExternalReference::new_space_allocation_top_address(isolate()); |
3719 | 3720 |
3720 // Just return if allocation top is already known. | 3721 // Just return if allocation top is already known. |
3721 if ((flags & RESULT_CONTAINS_TOP) != 0) { | 3722 if ((flags & RESULT_CONTAINS_TOP) != 0) { |
3722 // No use of scratch if allocation top is provided. | 3723 // No use of scratch if allocation top is provided. |
3723 ASSERT(!scratch.is_valid()); | 3724 ASSERT(!scratch.is_valid()); |
3724 #ifdef DEBUG | 3725 #ifdef DEBUG |
3725 // Assert that result actually contains top on entry. | 3726 // Assert that result actually contains top on entry. |
3726 Operand top_operand = ExternalOperand(new_space_allocation_top); | 3727 Operand top_operand = ExternalOperand(allocation_top); |
3727 cmpq(result, top_operand); | 3728 cmpq(result, top_operand); |
3728 Check(equal, "Unexpected allocation top"); | 3729 Check(equal, "Unexpected allocation top"); |
3729 #endif | 3730 #endif |
3730 return; | 3731 return; |
3731 } | 3732 } |
3732 | 3733 |
3733 // Move address of new object to result. Use scratch register if available, | 3734 // Move address of new object to result. Use scratch register if available, |
3734 // and keep address in scratch until call to UpdateAllocationTopHelper. | 3735 // and keep address in scratch until call to UpdateAllocationTopHelper. |
3735 if (scratch.is_valid()) { | 3736 if (scratch.is_valid()) { |
3736 LoadAddress(scratch, new_space_allocation_top); | 3737 LoadAddress(scratch, allocation_top); |
3737 movq(result, Operand(scratch, 0)); | 3738 movq(result, Operand(scratch, 0)); |
3738 } else { | 3739 } else { |
3739 Load(result, new_space_allocation_top); | 3740 Load(result, allocation_top); |
3740 } | 3741 } |
3741 } | 3742 } |
3742 | 3743 |
3743 | 3744 |
3744 void MacroAssembler::UpdateAllocationTopHelper(Register result_end, | 3745 void MacroAssembler::UpdateAllocationTopHelper(Register result_end, |
3745 Register scratch) { | 3746 Register scratch, |
| 3747 AllocationFlags flags) { |
3746 if (emit_debug_code()) { | 3748 if (emit_debug_code()) { |
3747 testq(result_end, Immediate(kObjectAlignmentMask)); | 3749 testq(result_end, Immediate(kObjectAlignmentMask)); |
3748 Check(zero, "Unaligned allocation in new space"); | 3750 Check(zero, "Unaligned allocation in new space"); |
3749 } | 3751 } |
3750 | 3752 |
3751 ExternalReference new_space_allocation_top = | 3753 ExternalReference allocation_top = ((flags & PRETENURE) != 0) ? |
| 3754 ExternalReference::old_pointer_space_allocation_top_address(isolate()) : |
3752 ExternalReference::new_space_allocation_top_address(isolate()); | 3755 ExternalReference::new_space_allocation_top_address(isolate()); |
3753 | 3756 |
3754 // Update new top. | 3757 // Update new top. |
3755 if (scratch.is_valid()) { | 3758 if (scratch.is_valid()) { |
3756 // Scratch already contains address of allocation top. | 3759 // Scratch already contains address of allocation top. |
3757 movq(Operand(scratch, 0), result_end); | 3760 movq(Operand(scratch, 0), result_end); |
3758 } else { | 3761 } else { |
3759 Store(new_space_allocation_top, result_end); | 3762 Store(allocation_top, result_end); |
3760 } | 3763 } |
3761 } | 3764 } |
3762 | 3765 |
3763 | 3766 |
3764 void MacroAssembler::AllocateInNewSpace(int object_size, | 3767 void MacroAssembler::Allocate(int object_size, |
3765 Register result, | 3768 Register result, |
3766 Register result_end, | 3769 Register result_end, |
3767 Register scratch, | 3770 Register scratch, |
3768 Label* gc_required, | 3771 Label* gc_required, |
3769 AllocationFlags flags) { | 3772 AllocationFlags flags) { |
3770 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); | 3773 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); |
3771 if (!FLAG_inline_new) { | 3774 if (!FLAG_inline_new) { |
3772 if (emit_debug_code()) { | 3775 if (emit_debug_code()) { |
3773 // Trash the registers to simulate an allocation failure. | 3776 // Trash the registers to simulate an allocation failure. |
3774 movl(result, Immediate(0x7091)); | 3777 movl(result, Immediate(0x7091)); |
3775 if (result_end.is_valid()) { | 3778 if (result_end.is_valid()) { |
3776 movl(result_end, Immediate(0x7191)); | 3779 movl(result_end, Immediate(0x7191)); |
3777 } | 3780 } |
3778 if (scratch.is_valid()) { | 3781 if (scratch.is_valid()) { |
3779 movl(scratch, Immediate(0x7291)); | 3782 movl(scratch, Immediate(0x7291)); |
3780 } | 3783 } |
3781 } | 3784 } |
3782 jmp(gc_required); | 3785 jmp(gc_required); |
3783 return; | 3786 return; |
3784 } | 3787 } |
3785 ASSERT(!result.is(result_end)); | 3788 ASSERT(!result.is(result_end)); |
3786 | 3789 |
3787 // Load address of new object into result. | 3790 // Load address of new object into result. |
3788 LoadAllocationTopHelper(result, scratch, flags); | 3791 LoadAllocationTopHelper(result, scratch, flags); |
3789 | 3792 |
3790 // Align the next allocation. Storing the filler map without checking top is | 3793 // Align the next allocation. Storing the filler map without checking top is |
3791 // always safe because the limit of the heap is always aligned. | 3794 // always safe because the limit of the heap is always aligned. |
3792 if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) { | 3795 if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) { |
3793 testq(result, Immediate(kDoubleAlignmentMask)); | 3796 testq(result, Immediate(kDoubleAlignmentMask)); |
3794 Check(zero, "Allocation is not double aligned"); | 3797 Check(zero, "Allocation is not double aligned"); |
3795 } | 3798 } |
3796 | 3799 |
3797 // Calculate new top and bail out if new space is exhausted. | 3800 // Calculate new top and bail out if new space is exhausted. |
3798 ExternalReference new_space_allocation_limit = | 3801 ExternalReference allocation_limit = ((flags & PRETENURE) != 0) ? |
| 3802 ExternalReference::old_pointer_space_allocation_limit_address( |
| 3803 isolate()) : |
3799 ExternalReference::new_space_allocation_limit_address(isolate()); | 3804 ExternalReference::new_space_allocation_limit_address(isolate()); |
3800 | 3805 |
3801 Register top_reg = result_end.is_valid() ? result_end : result; | 3806 Register top_reg = result_end.is_valid() ? result_end : result; |
3802 | 3807 |
3803 if (!top_reg.is(result)) { | 3808 if (!top_reg.is(result)) { |
3804 movq(top_reg, result); | 3809 movq(top_reg, result); |
3805 } | 3810 } |
3806 addq(top_reg, Immediate(object_size)); | 3811 addq(top_reg, Immediate(object_size)); |
3807 j(carry, gc_required); | 3812 j(carry, gc_required); |
3808 Operand limit_operand = ExternalOperand(new_space_allocation_limit); | 3813 Operand limit_operand = ExternalOperand(allocation_limit); |
3809 cmpq(top_reg, limit_operand); | 3814 cmpq(top_reg, limit_operand); |
3810 j(above, gc_required); | 3815 j(above, gc_required); |
3811 | 3816 |
3812 // Update allocation top. | 3817 // Update allocation top. |
3813 UpdateAllocationTopHelper(top_reg, scratch); | 3818 UpdateAllocationTopHelper(top_reg, scratch, flags); |
3814 | 3819 |
3815 bool tag_result = (flags & TAG_OBJECT) != 0; | 3820 bool tag_result = (flags & TAG_OBJECT) != 0; |
3816 if (top_reg.is(result)) { | 3821 if (top_reg.is(result)) { |
3817 if (tag_result) { | 3822 if (tag_result) { |
3818 subq(result, Immediate(object_size - kHeapObjectTag)); | 3823 subq(result, Immediate(object_size - kHeapObjectTag)); |
3819 } else { | 3824 } else { |
3820 subq(result, Immediate(object_size)); | 3825 subq(result, Immediate(object_size)); |
3821 } | 3826 } |
3822 } else if (tag_result) { | 3827 } else if (tag_result) { |
3823 // Tag the result if requested. | 3828 // Tag the result if requested. |
3824 ASSERT(kHeapObjectTag == 1); | 3829 ASSERT(kHeapObjectTag == 1); |
3825 incq(result); | 3830 incq(result); |
3826 } | 3831 } |
3827 } | 3832 } |
3828 | 3833 |
3829 | 3834 |
3830 void MacroAssembler::AllocateInNewSpace(int header_size, | 3835 void MacroAssembler::AllocateInNewSpace(int header_size, |
3831 ScaleFactor element_size, | 3836 ScaleFactor element_size, |
3832 Register element_count, | 3837 Register element_count, |
3833 Register result, | 3838 Register result, |
3834 Register result_end, | 3839 Register result_end, |
3835 Register scratch, | 3840 Register scratch, |
3836 Label* gc_required, | 3841 Label* gc_required, |
3837 AllocationFlags flags) { | 3842 AllocationFlags flags) { |
3838 ASSERT((flags & SIZE_IN_WORDS) == 0); | 3843 ASSERT((flags & SIZE_IN_WORDS) == 0); |
| 3844 ASSERT((flags & PRETENURE) == 0); |
3839 if (!FLAG_inline_new) { | 3845 if (!FLAG_inline_new) { |
3840 if (emit_debug_code()) { | 3846 if (emit_debug_code()) { |
3841 // Trash the registers to simulate an allocation failure. | 3847 // Trash the registers to simulate an allocation failure. |
3842 movl(result, Immediate(0x7091)); | 3848 movl(result, Immediate(0x7091)); |
3843 movl(result_end, Immediate(0x7191)); | 3849 movl(result_end, Immediate(0x7191)); |
3844 if (scratch.is_valid()) { | 3850 if (scratch.is_valid()) { |
3845 movl(scratch, Immediate(0x7291)); | 3851 movl(scratch, Immediate(0x7291)); |
3846 } | 3852 } |
3847 // Register element_count is not modified by the function. | 3853 // Register element_count is not modified by the function. |
3848 } | 3854 } |
(...skipping 19 matching lines...) Expand all Loading... |
3868 // We assume that element_count*element_size + header_size does not | 3874 // We assume that element_count*element_size + header_size does not |
3869 // overflow. | 3875 // overflow. |
3870 lea(result_end, Operand(element_count, element_size, header_size)); | 3876 lea(result_end, Operand(element_count, element_size, header_size)); |
3871 addq(result_end, result); | 3877 addq(result_end, result); |
3872 j(carry, gc_required); | 3878 j(carry, gc_required); |
3873 Operand limit_operand = ExternalOperand(new_space_allocation_limit); | 3879 Operand limit_operand = ExternalOperand(new_space_allocation_limit); |
3874 cmpq(result_end, limit_operand); | 3880 cmpq(result_end, limit_operand); |
3875 j(above, gc_required); | 3881 j(above, gc_required); |
3876 | 3882 |
3877 // Update allocation top. | 3883 // Update allocation top. |
3878 UpdateAllocationTopHelper(result_end, scratch); | 3884 UpdateAllocationTopHelper(result_end, scratch, flags); |
3879 | 3885 |
3880 // Tag the result if requested. | 3886 // Tag the result if requested. |
3881 if ((flags & TAG_OBJECT) != 0) { | 3887 if ((flags & TAG_OBJECT) != 0) { |
3882 ASSERT(kHeapObjectTag == 1); | 3888 ASSERT(kHeapObjectTag == 1); |
3883 incq(result); | 3889 incq(result); |
3884 } | 3890 } |
3885 } | 3891 } |
3886 | 3892 |
3887 | 3893 |
3888 void MacroAssembler::AllocateInNewSpace(Register object_size, | 3894 void MacroAssembler::AllocateInNewSpace(Register object_size, |
3889 Register result, | 3895 Register result, |
3890 Register result_end, | 3896 Register result_end, |
3891 Register scratch, | 3897 Register scratch, |
3892 Label* gc_required, | 3898 Label* gc_required, |
3893 AllocationFlags flags) { | 3899 AllocationFlags flags) { |
3894 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); | 3900 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); |
| 3901 ASSERT((flags & PRETENURE) == 0); |
3895 if (!FLAG_inline_new) { | 3902 if (!FLAG_inline_new) { |
3896 if (emit_debug_code()) { | 3903 if (emit_debug_code()) { |
3897 // Trash the registers to simulate an allocation failure. | 3904 // Trash the registers to simulate an allocation failure. |
3898 movl(result, Immediate(0x7091)); | 3905 movl(result, Immediate(0x7091)); |
3899 movl(result_end, Immediate(0x7191)); | 3906 movl(result_end, Immediate(0x7191)); |
3900 if (scratch.is_valid()) { | 3907 if (scratch.is_valid()) { |
3901 movl(scratch, Immediate(0x7291)); | 3908 movl(scratch, Immediate(0x7291)); |
3902 } | 3909 } |
3903 // object_size is left unchanged by this function. | 3910 // object_size is left unchanged by this function. |
3904 } | 3911 } |
(...skipping 11 matching lines...) Expand all Loading... |
3916 if (!object_size.is(result_end)) { | 3923 if (!object_size.is(result_end)) { |
3917 movq(result_end, object_size); | 3924 movq(result_end, object_size); |
3918 } | 3925 } |
3919 addq(result_end, result); | 3926 addq(result_end, result); |
3920 j(carry, gc_required); | 3927 j(carry, gc_required); |
3921 Operand limit_operand = ExternalOperand(new_space_allocation_limit); | 3928 Operand limit_operand = ExternalOperand(new_space_allocation_limit); |
3922 cmpq(result_end, limit_operand); | 3929 cmpq(result_end, limit_operand); |
3923 j(above, gc_required); | 3930 j(above, gc_required); |
3924 | 3931 |
3925 // Update allocation top. | 3932 // Update allocation top. |
3926 UpdateAllocationTopHelper(result_end, scratch); | 3933 UpdateAllocationTopHelper(result_end, scratch, flags); |
3927 | 3934 |
3928 // Align the next allocation. Storing the filler map without checking top is | 3935 // Align the next allocation. Storing the filler map without checking top is |
3929 // always safe because the limit of the heap is always aligned. | 3936 // always safe because the limit of the heap is always aligned. |
3930 if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) { | 3937 if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) { |
3931 testq(result, Immediate(kDoubleAlignmentMask)); | 3938 testq(result, Immediate(kDoubleAlignmentMask)); |
3932 Check(zero, "Allocation is not double aligned"); | 3939 Check(zero, "Allocation is not double aligned"); |
3933 } | 3940 } |
3934 | 3941 |
3935 // Tag the result if requested. | 3942 // Tag the result if requested. |
3936 if ((flags & TAG_OBJECT) != 0) { | 3943 if ((flags & TAG_OBJECT) != 0) { |
(...skipping 14 matching lines...) Expand all Loading... |
3951 Check(below, "Undo allocation of non allocated memory"); | 3958 Check(below, "Undo allocation of non allocated memory"); |
3952 #endif | 3959 #endif |
3953 movq(top_operand, object); | 3960 movq(top_operand, object); |
3954 } | 3961 } |
3955 | 3962 |
3956 | 3963 |
3957 void MacroAssembler::AllocateHeapNumber(Register result, | 3964 void MacroAssembler::AllocateHeapNumber(Register result, |
3958 Register scratch, | 3965 Register scratch, |
3959 Label* gc_required) { | 3966 Label* gc_required) { |
3960 // Allocate heap number in new space. | 3967 // Allocate heap number in new space. |
3961 AllocateInNewSpace(HeapNumber::kSize, | 3968 Allocate(HeapNumber::kSize, result, scratch, no_reg, gc_required, TAG_OBJECT); |
3962 result, | |
3963 scratch, | |
3964 no_reg, | |
3965 gc_required, | |
3966 TAG_OBJECT); | |
3967 | 3969 |
3968 // Set the map. | 3970 // Set the map. |
3969 LoadRoot(kScratchRegister, Heap::kHeapNumberMapRootIndex); | 3971 LoadRoot(kScratchRegister, Heap::kHeapNumberMapRootIndex); |
3970 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); | 3972 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
3971 } | 3973 } |
3972 | 3974 |
3973 | 3975 |
3974 void MacroAssembler::AllocateTwoByteString(Register result, | 3976 void MacroAssembler::AllocateTwoByteString(Register result, |
3975 Register length, | 3977 Register length, |
3976 Register scratch1, | 3978 Register scratch1, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4046 movq(FieldOperand(result, String::kHashFieldOffset), | 4048 movq(FieldOperand(result, String::kHashFieldOffset), |
4047 Immediate(String::kEmptyHashField)); | 4049 Immediate(String::kEmptyHashField)); |
4048 } | 4050 } |
4049 | 4051 |
4050 | 4052 |
4051 void MacroAssembler::AllocateTwoByteConsString(Register result, | 4053 void MacroAssembler::AllocateTwoByteConsString(Register result, |
4052 Register scratch1, | 4054 Register scratch1, |
4053 Register scratch2, | 4055 Register scratch2, |
4054 Label* gc_required) { | 4056 Label* gc_required) { |
4055 // Allocate heap number in new space. | 4057 // Allocate heap number in new space. |
4056 AllocateInNewSpace(ConsString::kSize, | 4058 Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required, |
4057 result, | 4059 TAG_OBJECT); |
4058 scratch1, | |
4059 scratch2, | |
4060 gc_required, | |
4061 TAG_OBJECT); | |
4062 | 4060 |
4063 // Set the map. The other fields are left uninitialized. | 4061 // Set the map. The other fields are left uninitialized. |
4064 LoadRoot(kScratchRegister, Heap::kConsStringMapRootIndex); | 4062 LoadRoot(kScratchRegister, Heap::kConsStringMapRootIndex); |
4065 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); | 4063 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
4066 } | 4064 } |
4067 | 4065 |
4068 | 4066 |
4069 void MacroAssembler::AllocateAsciiConsString(Register result, | 4067 void MacroAssembler::AllocateAsciiConsString(Register result, |
4070 Register scratch1, | 4068 Register scratch1, |
4071 Register scratch2, | 4069 Register scratch2, |
4072 Label* gc_required) { | 4070 Label* gc_required) { |
4073 // Allocate heap number in new space. | 4071 // Allocate heap number in new space. |
4074 AllocateInNewSpace(ConsString::kSize, | 4072 Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required, |
4075 result, | 4073 TAG_OBJECT); |
4076 scratch1, | |
4077 scratch2, | |
4078 gc_required, | |
4079 TAG_OBJECT); | |
4080 | 4074 |
4081 // Set the map. The other fields are left uninitialized. | 4075 // Set the map. The other fields are left uninitialized. |
4082 LoadRoot(kScratchRegister, Heap::kConsAsciiStringMapRootIndex); | 4076 LoadRoot(kScratchRegister, Heap::kConsAsciiStringMapRootIndex); |
4083 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); | 4077 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
4084 } | 4078 } |
4085 | 4079 |
4086 | 4080 |
4087 void MacroAssembler::AllocateTwoByteSlicedString(Register result, | 4081 void MacroAssembler::AllocateTwoByteSlicedString(Register result, |
4088 Register scratch1, | 4082 Register scratch1, |
4089 Register scratch2, | 4083 Register scratch2, |
4090 Label* gc_required) { | 4084 Label* gc_required) { |
4091 // Allocate heap number in new space. | 4085 // Allocate heap number in new space. |
4092 AllocateInNewSpace(SlicedString::kSize, | 4086 Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required, |
4093 result, | 4087 TAG_OBJECT); |
4094 scratch1, | |
4095 scratch2, | |
4096 gc_required, | |
4097 TAG_OBJECT); | |
4098 | 4088 |
4099 // Set the map. The other fields are left uninitialized. | 4089 // Set the map. The other fields are left uninitialized. |
4100 LoadRoot(kScratchRegister, Heap::kSlicedStringMapRootIndex); | 4090 LoadRoot(kScratchRegister, Heap::kSlicedStringMapRootIndex); |
4101 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); | 4091 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
4102 } | 4092 } |
4103 | 4093 |
4104 | 4094 |
4105 void MacroAssembler::AllocateAsciiSlicedString(Register result, | 4095 void MacroAssembler::AllocateAsciiSlicedString(Register result, |
4106 Register scratch1, | 4096 Register scratch1, |
4107 Register scratch2, | 4097 Register scratch2, |
4108 Label* gc_required) { | 4098 Label* gc_required) { |
4109 // Allocate heap number in new space. | 4099 // Allocate heap number in new space. |
4110 AllocateInNewSpace(SlicedString::kSize, | 4100 Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required, |
4111 result, | 4101 TAG_OBJECT); |
4112 scratch1, | |
4113 scratch2, | |
4114 gc_required, | |
4115 TAG_OBJECT); | |
4116 | 4102 |
4117 // Set the map. The other fields are left uninitialized. | 4103 // Set the map. The other fields are left uninitialized. |
4118 LoadRoot(kScratchRegister, Heap::kSlicedAsciiStringMapRootIndex); | 4104 LoadRoot(kScratchRegister, Heap::kSlicedAsciiStringMapRootIndex); |
4119 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); | 4105 movq(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
4120 } | 4106 } |
4121 | 4107 |
4122 | 4108 |
4123 // Copy memory, byte-by-byte, from source to destination. Not optimized for | 4109 // Copy memory, byte-by-byte, from source to destination. Not optimized for |
4124 // long or aligned copies. The contents of scratch and length are destroyed. | 4110 // long or aligned copies. The contents of scratch and length are destroyed. |
4125 // Destination is incremented by length, source, length and scratch are | 4111 // Destination is incremented by length, source, length and scratch are |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4651 j(greater, &no_info_available); | 4637 j(greater, &no_info_available); |
4652 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 4638 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
4653 Heap::kAllocationSiteInfoMapRootIndex); | 4639 Heap::kAllocationSiteInfoMapRootIndex); |
4654 bind(&no_info_available); | 4640 bind(&no_info_available); |
4655 } | 4641 } |
4656 | 4642 |
4657 | 4643 |
4658 } } // namespace v8::internal | 4644 } } // namespace v8::internal |
4659 | 4645 |
4660 #endif // V8_TARGET_ARCH_X64 | 4646 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |