| 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 3803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3814 } | 3814 } |
| 3815 jmp(gc_required); | 3815 jmp(gc_required); |
| 3816 return; | 3816 return; |
| 3817 } | 3817 } |
| 3818 ASSERT(!result.is(result_end)); | 3818 ASSERT(!result.is(result_end)); |
| 3819 | 3819 |
| 3820 // Load address of new object into result. | 3820 // Load address of new object into result. |
| 3821 LoadAllocationTopHelper(result, scratch, flags); | 3821 LoadAllocationTopHelper(result, scratch, flags); |
| 3822 | 3822 |
| 3823 // Align the next allocation. Storing the filler map without checking top is | 3823 // Align the next allocation. Storing the filler map without checking top is |
| 3824 // always safe because the limit of the heap is always aligned. | 3824 // safe in new-space because the limit of the heap is aligned there. |
| 3825 if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) { | 3825 if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) { |
| 3826 testq(result, Immediate(kDoubleAlignmentMask)); | 3826 testq(result, Immediate(kDoubleAlignmentMask)); |
| 3827 Check(zero, "Allocation is not double aligned"); | 3827 Check(zero, "Allocation is not double aligned"); |
| 3828 } | 3828 } |
| 3829 | 3829 |
| 3830 // Calculate new top and bail out if new space is exhausted. | 3830 // Calculate new top and bail out if new space is exhausted. |
| 3831 ExternalReference allocation_limit = | 3831 ExternalReference allocation_limit = |
| 3832 AllocationUtils::GetAllocationLimitReference(isolate(), flags); | 3832 AllocationUtils::GetAllocationLimitReference(isolate(), flags); |
| 3833 | 3833 |
| 3834 Register top_reg = result_end.is_valid() ? result_end : result; | 3834 Register top_reg = result_end.is_valid() ? result_end : result; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3881 } | 3881 } |
| 3882 jmp(gc_required); | 3882 jmp(gc_required); |
| 3883 return; | 3883 return; |
| 3884 } | 3884 } |
| 3885 ASSERT(!result.is(result_end)); | 3885 ASSERT(!result.is(result_end)); |
| 3886 | 3886 |
| 3887 // Load address of new object into result. | 3887 // Load address of new object into result. |
| 3888 LoadAllocationTopHelper(result, scratch, flags); | 3888 LoadAllocationTopHelper(result, scratch, flags); |
| 3889 | 3889 |
| 3890 // Align the next allocation. Storing the filler map without checking top is | 3890 // Align the next allocation. Storing the filler map without checking top is |
| 3891 // always safe because the limit of the heap is always aligned. | 3891 // safe in new-space because the limit of the heap is aligned there. |
| 3892 if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) { | 3892 if (((flags & DOUBLE_ALIGNMENT) != 0) && FLAG_debug_code) { |
| 3893 testq(result, Immediate(kDoubleAlignmentMask)); | 3893 testq(result, Immediate(kDoubleAlignmentMask)); |
| 3894 Check(zero, "Allocation is not double aligned"); | 3894 Check(zero, "Allocation is not double aligned"); |
| 3895 } | 3895 } |
| 3896 | 3896 |
| 3897 // Calculate new top and bail out if new space is exhausted. | 3897 // Calculate new top and bail out if new space is exhausted. |
| 3898 ExternalReference allocation_limit = | 3898 ExternalReference allocation_limit = |
| 3899 AllocationUtils::GetAllocationLimitReference(isolate(), flags); | 3899 AllocationUtils::GetAllocationLimitReference(isolate(), flags); |
| 3900 | 3900 |
| 3901 // We assume that element_count*element_size + header_size does not | 3901 // We assume that element_count*element_size + header_size does not |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4700 j(greater, &no_info_available); | 4700 j(greater, &no_info_available); |
| 4701 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 4701 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
| 4702 Heap::kAllocationSiteInfoMapRootIndex); | 4702 Heap::kAllocationSiteInfoMapRootIndex); |
| 4703 bind(&no_info_available); | 4703 bind(&no_info_available); |
| 4704 } | 4704 } |
| 4705 | 4705 |
| 4706 | 4706 |
| 4707 } } // namespace v8::internal | 4707 } } // namespace v8::internal |
| 4708 | 4708 |
| 4709 #endif // V8_TARGET_ARCH_X64 | 4709 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |