Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 21063002: Out-of-line constant pool on Arm: Stage 1 - Free up r7 for use as constant pool pointer register (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix typo Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 863
864 // Pass the additional arguments. 864 // Pass the additional arguments.
865 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 865 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
866 Handle<Object> call_data(api_call_info->data(), masm->isolate()); 866 Handle<Object> call_data(api_call_info->data(), masm->isolate());
867 if (masm->isolate()->heap()->InNewSpace(*call_data)) { 867 if (masm->isolate()->heap()->InNewSpace(*call_data)) {
868 __ Move(r0, api_call_info); 868 __ Move(r0, api_call_info);
869 __ ldr(r6, FieldMemOperand(r0, CallHandlerInfo::kDataOffset)); 869 __ ldr(r6, FieldMemOperand(r0, CallHandlerInfo::kDataOffset));
870 } else { 870 } else {
871 __ Move(r6, call_data); 871 __ Move(r6, call_data);
872 } 872 }
873 __ mov(r7, Operand(ExternalReference::isolate_address(masm->isolate()))); 873 __ mov(ip, Operand(ExternalReference::isolate_address(masm->isolate())));
ulan 2013/07/30 09:45:19 This mov might use ip internally.
874 // Store JS function, call data, isolate ReturnValue default and ReturnValue. 874 // Store JS function, call data, isolate ReturnValue default and ReturnValue.
875 __ stm(ib, sp, r5.bit() | r6.bit() | r7.bit()); 875 __ stm(ib, sp, r5.bit() | r6.bit() | ip.bit());
876 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); 876 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex);
877 __ str(r5, MemOperand(sp, 4 * kPointerSize)); 877 __ str(r5, MemOperand(sp, 4 * kPointerSize));
878 __ str(r5, MemOperand(sp, 5 * kPointerSize)); 878 __ str(r5, MemOperand(sp, 5 * kPointerSize));
879 879
880 // Prepare arguments. 880 // Prepare arguments.
881 __ add(r2, sp, Operand(5 * kPointerSize)); 881 __ add(r2, sp, Operand(5 * kPointerSize));
882 882
883 // Allocate the v8::Arguments structure in the arguments' space since 883 // Allocate the v8::Arguments structure in the arguments' space since
884 // it's not controlled by GC. 884 // it's not controlled by GC.
885 const int kApiStackSpace = 4; 885 const int kApiStackSpace = 4;
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 // Check for a smi. 1823 // Check for a smi.
1824 __ Drop(argc + 1); 1824 __ Drop(argc + 1);
1825 __ Ret(); 1825 __ Ret();
1826 1826
1827 __ bind(&with_write_barrier); 1827 __ bind(&with_write_barrier);
1828 1828
1829 __ ldr(r3, FieldMemOperand(receiver, HeapObject::kMapOffset)); 1829 __ ldr(r3, FieldMemOperand(receiver, HeapObject::kMapOffset));
1830 1830
1831 if (FLAG_smi_only_arrays && !FLAG_trace_elements_transitions) { 1831 if (FLAG_smi_only_arrays && !FLAG_trace_elements_transitions) {
1832 Label fast_object, not_fast_object; 1832 Label fast_object, not_fast_object;
1833 __ CheckFastObjectElements(r3, r7, &not_fast_object); 1833 __ CheckFastObjectElements(r3, r9, &not_fast_object);
1834 __ jmp(&fast_object); 1834 __ jmp(&fast_object);
1835 // In case of fast smi-only, convert to fast object, otherwise bail out. 1835 // In case of fast smi-only, convert to fast object, otherwise bail out.
1836 __ bind(&not_fast_object); 1836 __ bind(&not_fast_object);
1837 __ CheckFastSmiElements(r3, r7, &call_builtin); 1837 __ CheckFastSmiElements(r3, r9, &call_builtin);
1838 1838
1839 __ ldr(r7, FieldMemOperand(r4, HeapObject::kMapOffset)); 1839 __ ldr(r9, FieldMemOperand(r4, HeapObject::kMapOffset));
1840 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex); 1840 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex);
1841 __ cmp(r7, ip); 1841 __ cmp(r9, ip);
1842 __ b(eq, &call_builtin); 1842 __ b(eq, &call_builtin);
1843 // edx: receiver 1843 // edx: receiver
1844 // r3: map 1844 // r3: map
1845 Label try_holey_map; 1845 Label try_holey_map;
1846 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1846 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1847 FAST_ELEMENTS, 1847 FAST_ELEMENTS,
1848 r3, 1848 r3,
1849 r7, 1849 r9,
1850 &try_holey_map); 1850 &try_holey_map);
1851 __ mov(r2, receiver); 1851 __ mov(r2, receiver);
1852 ElementsTransitionGenerator:: 1852 ElementsTransitionGenerator::
1853 GenerateMapChangeElementsTransition(masm(), 1853 GenerateMapChangeElementsTransition(masm(),
1854 DONT_TRACK_ALLOCATION_SITE, 1854 DONT_TRACK_ALLOCATION_SITE,
1855 NULL); 1855 NULL);
1856 __ jmp(&fast_object); 1856 __ jmp(&fast_object);
1857 1857
1858 __ bind(&try_holey_map); 1858 __ bind(&try_holey_map);
1859 __ LoadTransitionedArrayMapConditional(FAST_HOLEY_SMI_ELEMENTS, 1859 __ LoadTransitionedArrayMapConditional(FAST_HOLEY_SMI_ELEMENTS,
1860 FAST_HOLEY_ELEMENTS, 1860 FAST_HOLEY_ELEMENTS,
1861 r3, 1861 r3,
1862 r7, 1862 r9,
1863 &call_builtin); 1863 &call_builtin);
1864 __ mov(r2, receiver); 1864 __ mov(r2, receiver);
1865 ElementsTransitionGenerator:: 1865 ElementsTransitionGenerator::
1866 GenerateMapChangeElementsTransition(masm(), 1866 GenerateMapChangeElementsTransition(masm(),
1867 DONT_TRACK_ALLOCATION_SITE, 1867 DONT_TRACK_ALLOCATION_SITE,
1868 NULL); 1868 NULL);
1869 __ bind(&fast_object); 1869 __ bind(&fast_object);
1870 } else { 1870 } else {
1871 __ CheckFastObjectElements(r3, r3, &call_builtin); 1871 __ CheckFastObjectElements(r3, r3, &call_builtin);
1872 } 1872 }
(...skipping 12 matching lines...) Expand all
1885 r4, 1885 r4,
1886 kLRHasNotBeenSaved, 1886 kLRHasNotBeenSaved,
1887 kDontSaveFPRegs, 1887 kDontSaveFPRegs,
1888 EMIT_REMEMBERED_SET, 1888 EMIT_REMEMBERED_SET,
1889 OMIT_SMI_CHECK); 1889 OMIT_SMI_CHECK);
1890 __ Drop(argc + 1); 1890 __ Drop(argc + 1);
1891 __ Ret(); 1891 __ Ret();
1892 1892
1893 __ bind(&attempt_to_grow_elements); 1893 __ bind(&attempt_to_grow_elements);
1894 // r0: array's length + 1. 1894 // r0: array's length + 1.
1895 // r4: elements' length.
1896 1895
1897 if (!FLAG_inline_new) { 1896 if (!FLAG_inline_new) {
1898 __ b(&call_builtin); 1897 __ b(&call_builtin);
1899 } 1898 }
1900 1899
1901 __ ldr(r2, MemOperand(sp, (argc - 1) * kPointerSize)); 1900 __ ldr(r2, MemOperand(sp, (argc - 1) * kPointerSize));
1902 // Growing elements that are SMI-only requires special handling in case 1901 // Growing elements that are SMI-only requires special handling in case
1903 // the new element is non-Smi. For now, delegate to the builtin. 1902 // the new element is non-Smi. For now, delegate to the builtin.
1904 Label no_fast_elements_check; 1903 Label no_fast_elements_check;
1905 __ JumpIfSmi(r2, &no_fast_elements_check); 1904 __ JumpIfSmi(r2, &no_fast_elements_check);
1906 __ ldr(r7, FieldMemOperand(receiver, HeapObject::kMapOffset)); 1905 __ ldr(r9, FieldMemOperand(receiver, HeapObject::kMapOffset));
1907 __ CheckFastObjectElements(r7, r7, &call_builtin); 1906 __ CheckFastObjectElements(r9, r9, &call_builtin);
1908 __ bind(&no_fast_elements_check); 1907 __ bind(&no_fast_elements_check);
1909 1908
1910 ExternalReference new_space_allocation_top = 1909 ExternalReference new_space_allocation_top =
1911 ExternalReference::new_space_allocation_top_address(isolate()); 1910 ExternalReference::new_space_allocation_top_address(isolate());
1912 ExternalReference new_space_allocation_limit = 1911 ExternalReference new_space_allocation_limit =
1913 ExternalReference::new_space_allocation_limit_address(isolate()); 1912 ExternalReference::new_space_allocation_limit_address(isolate());
1914 1913
1915 const int kAllocationDelta = 4; 1914 const int kAllocationDelta = 4;
1916 // Load top and check if it is the end of elements. 1915 // Load top and check if it is the end of elements.
1917 __ add(end_elements, elements, Operand::PointerOffsetFromSmiKey(r0)); 1916 __ add(end_elements, elements, Operand::PointerOffsetFromSmiKey(r0));
1918 __ add(end_elements, end_elements, Operand(kEndElementsOffset)); 1917 __ add(end_elements, end_elements, Operand(kEndElementsOffset));
1919 __ mov(r7, Operand(new_space_allocation_top)); 1918 __ mov(r4, Operand(new_space_allocation_top));
1920 __ ldr(r3, MemOperand(r7)); 1919 __ ldr(r3, MemOperand(r4));
1921 __ cmp(end_elements, r3); 1920 __ cmp(end_elements, r3);
1922 __ b(ne, &call_builtin); 1921 __ b(ne, &call_builtin);
1923 1922
1924 __ mov(r9, Operand(new_space_allocation_limit)); 1923 __ mov(r9, Operand(new_space_allocation_limit));
1925 __ ldr(r9, MemOperand(r9)); 1924 __ ldr(r9, MemOperand(r9));
1926 __ add(r3, r3, Operand(kAllocationDelta * kPointerSize)); 1925 __ add(r3, r3, Operand(kAllocationDelta * kPointerSize));
1927 __ cmp(r3, r9); 1926 __ cmp(r3, r9);
1928 __ b(hi, &call_builtin); 1927 __ b(hi, &call_builtin);
1929 1928
1930 // We fit and could grow elements. 1929 // We fit and could grow elements.
1931 // Update new_space_allocation_top. 1930 // Update new_space_allocation_top.
1932 __ str(r3, MemOperand(r7)); 1931 __ str(r3, MemOperand(r4));
1933 // Push the argument. 1932 // Push the argument.
1934 __ str(r2, MemOperand(end_elements)); 1933 __ str(r2, MemOperand(end_elements));
1935 // Fill the rest with holes. 1934 // Fill the rest with holes.
1936 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); 1935 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex);
1937 for (int i = 1; i < kAllocationDelta; i++) { 1936 for (int i = 1; i < kAllocationDelta; i++) {
1938 __ str(r3, MemOperand(end_elements, i * kPointerSize)); 1937 __ str(r3, MemOperand(end_elements, i * kPointerSize));
1939 } 1938 }
1940 1939
1941 // Update elements' and array's sizes. 1940 // Update elements' and array's sizes.
1942 __ str(r0, FieldMemOperand(receiver, JSArray::kLengthOffset)); 1941 __ str(r0, FieldMemOperand(receiver, JSArray::kLengthOffset));
1942 __ ldr(r4, FieldMemOperand(elements, FixedArray::kLengthOffset));
1943 __ add(r4, r4, Operand(Smi::FromInt(kAllocationDelta))); 1943 __ add(r4, r4, Operand(Smi::FromInt(kAllocationDelta)));
1944 __ str(r4, FieldMemOperand(elements, FixedArray::kLengthOffset)); 1944 __ str(r4, FieldMemOperand(elements, FixedArray::kLengthOffset));
1945 1945
1946 // Elements are in new space, so write barrier is not required. 1946 // Elements are in new space, so write barrier is not required.
1947 __ Drop(argc + 1); 1947 __ Drop(argc + 1);
1948 __ Ret(); 1948 __ Ret();
1949 } 1949 }
1950 __ bind(&call_builtin); 1950 __ bind(&call_builtin);
1951 __ TailCallExternalReference( 1951 __ TailCallExternalReference(
1952 ExternalReference(Builtins::c_ArrayPush, isolate()), argc + 1, 1); 1952 ExternalReference(Builtins::c_ArrayPush, isolate()), argc + 1, 1);
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
3274 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 3274 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
3275 __ strh(r5, MemOperand(r3, key, LSL, 0)); 3275 __ strh(r5, MemOperand(r3, key, LSL, 0));
3276 break; 3276 break;
3277 case EXTERNAL_INT_ELEMENTS: 3277 case EXTERNAL_INT_ELEMENTS:
3278 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 3278 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
3279 __ str(r5, MemOperand(r3, key, LSL, 1)); 3279 __ str(r5, MemOperand(r3, key, LSL, 1));
3280 break; 3280 break;
3281 case EXTERNAL_FLOAT_ELEMENTS: 3281 case EXTERNAL_FLOAT_ELEMENTS:
3282 // Perform int-to-float conversion and store to memory. 3282 // Perform int-to-float conversion and store to memory.
3283 __ SmiUntag(r4, key); 3283 __ SmiUntag(r4, key);
3284 StoreIntAsFloat(masm, r3, r4, r5, r7); 3284 StoreIntAsFloat(masm, r3, r4, r5, r6);
3285 break; 3285 break;
3286 case EXTERNAL_DOUBLE_ELEMENTS: 3286 case EXTERNAL_DOUBLE_ELEMENTS:
3287 __ vmov(s2, r5); 3287 __ vmov(s2, r5);
3288 __ vcvt_f64_s32(d0, s2); 3288 __ vcvt_f64_s32(d0, s2);
3289 __ add(r3, r3, Operand(key, LSL, 2)); 3289 __ add(r3, r3, Operand(key, LSL, 2));
3290 // r3: effective address of the double element 3290 // r3: effective address of the double element
3291 __ vstr(d0, r3, 0); 3291 __ vstr(d0, r3, 0);
3292 break; 3292 break;
3293 case FAST_ELEMENTS: 3293 case FAST_ELEMENTS:
3294 case FAST_SMI_ELEMENTS: 3294 case FAST_SMI_ELEMENTS:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
3330 } else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { 3330 } else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) {
3331 __ sub(r5, r0, Operand(kHeapObjectTag)); 3331 __ sub(r5, r0, Operand(kHeapObjectTag));
3332 __ vldr(d0, r5, HeapNumber::kValueOffset); 3332 __ vldr(d0, r5, HeapNumber::kValueOffset);
3333 __ add(r5, r3, Operand(key, LSL, 2)); 3333 __ add(r5, r3, Operand(key, LSL, 2));
3334 __ vstr(d0, r5, 0); 3334 __ vstr(d0, r5, 0);
3335 } else { 3335 } else {
3336 // Hoisted load. vldr requires offset to be a multiple of 4 so we can 3336 // Hoisted load. vldr requires offset to be a multiple of 4 so we can
3337 // not include -kHeapObjectTag into it. 3337 // not include -kHeapObjectTag into it.
3338 __ sub(r5, value, Operand(kHeapObjectTag)); 3338 __ sub(r5, value, Operand(kHeapObjectTag));
3339 __ vldr(d0, r5, HeapNumber::kValueOffset); 3339 __ vldr(d0, r5, HeapNumber::kValueOffset);
3340 __ ECMAToInt32(r5, d0, r6, r7, r9, d1); 3340 __ ECMAToInt32(r5, d0, r4, r6, r9, d1);
3341 3341
3342 switch (elements_kind) { 3342 switch (elements_kind) {
3343 case EXTERNAL_BYTE_ELEMENTS: 3343 case EXTERNAL_BYTE_ELEMENTS:
3344 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 3344 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
3345 __ strb(r5, MemOperand(r3, key, LSR, 1)); 3345 __ strb(r5, MemOperand(r3, key, LSR, 1));
3346 break; 3346 break;
3347 case EXTERNAL_SHORT_ELEMENTS: 3347 case EXTERNAL_SHORT_ELEMENTS:
3348 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 3348 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
3349 __ strh(r5, MemOperand(r3, key, LSL, 0)); 3349 __ strh(r5, MemOperand(r3, key, LSL, 0));
3350 break; 3350 break;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
3567 // -- r5 : scratch 3567 // -- r5 : scratch
3568 // ----------------------------------- 3568 // -----------------------------------
3569 Label miss_force_generic, transition_elements_kind, grow, slow; 3569 Label miss_force_generic, transition_elements_kind, grow, slow;
3570 Label finish_store, check_capacity; 3570 Label finish_store, check_capacity;
3571 3571
3572 Register value_reg = r0; 3572 Register value_reg = r0;
3573 Register key_reg = r1; 3573 Register key_reg = r1;
3574 Register receiver_reg = r2; 3574 Register receiver_reg = r2;
3575 Register elements_reg = r3; 3575 Register elements_reg = r3;
3576 Register scratch1 = r4; 3576 Register scratch1 = r4;
3577 Register scratch2 = r5; 3577 Register scratch2 = no_reg; // Will be r5.
3578 Register length_reg = r7; 3578 Register length_reg = r5;
3579 3579
3580 // This stub is meant to be tail-jumped to, the receiver must already 3580 // This stub is meant to be tail-jumped to, the receiver must already
3581 // have been verified by the caller to not be a smi. 3581 // have been verified by the caller to not be a smi.
3582 3582
3583 // Check that the key is a smi or a heap number convertible to a smi. 3583 // Check that the key is a smi or a heap number convertible to a smi.
3584 GenerateSmiKeyCheck(masm, key_reg, r4, d1, d2, &miss_force_generic); 3584 GenerateSmiKeyCheck(masm, key_reg, r4, d1, d2, &miss_force_generic);
3585 3585
3586 __ ldr(elements_reg, 3586 __ ldr(elements_reg,
3587 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); 3587 FieldMemOperand(receiver_reg, JSObject::kElementsOffset));
3588 3588
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
3632 3632
3633 // Check for the empty array, and preallocate a small backing store if 3633 // Check for the empty array, and preallocate a small backing store if
3634 // possible. 3634 // possible.
3635 __ ldr(length_reg, 3635 __ ldr(length_reg,
3636 FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); 3636 FieldMemOperand(receiver_reg, JSArray::kLengthOffset));
3637 __ ldr(elements_reg, 3637 __ ldr(elements_reg,
3638 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); 3638 FieldMemOperand(receiver_reg, JSObject::kElementsOffset));
3639 __ CompareRoot(elements_reg, Heap::kEmptyFixedArrayRootIndex); 3639 __ CompareRoot(elements_reg, Heap::kEmptyFixedArrayRootIndex);
3640 __ b(ne, &check_capacity); 3640 __ b(ne, &check_capacity);
3641 3641
3642 scratch2 = length_reg; // Use length_reg as scratch2 here.
3643
3642 int size = FixedDoubleArray::SizeFor(JSArray::kPreallocatedArrayElements); 3644 int size = FixedDoubleArray::SizeFor(JSArray::kPreallocatedArrayElements);
3643 __ Allocate(size, elements_reg, scratch1, scratch2, &slow, TAG_OBJECT); 3645 __ Allocate(size, elements_reg, scratch1, scratch2, &slow, TAG_OBJECT);
3644 3646
3645 // Initialize the new FixedDoubleArray. 3647 // Initialize the new FixedDoubleArray.
3646 __ LoadRoot(scratch1, Heap::kFixedDoubleArrayMapRootIndex); 3648 __ LoadRoot(scratch1, Heap::kFixedDoubleArrayMapRootIndex);
3647 __ str(scratch1, FieldMemOperand(elements_reg, JSObject::kMapOffset)); 3649 __ str(scratch1, FieldMemOperand(elements_reg, JSObject::kMapOffset));
3648 __ mov(scratch1, 3650 __ mov(scratch1,
3649 Operand(Smi::FromInt(JSArray::kPreallocatedArrayElements))); 3651 Operand(Smi::FromInt(JSArray::kPreallocatedArrayElements)));
3650 __ str(scratch1, 3652 __ str(scratch1,
3651 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset)); 3653 FieldMemOperand(elements_reg, FixedDoubleArray::kLengthOffset));
3652 3654
3653 __ mov(scratch1, elements_reg); 3655 __ mov(scratch1, elements_reg);
3654 __ StoreNumberToDoubleElements(value_reg, key_reg, scratch1, 3656 __ StoreNumberToDoubleElements(value_reg, key_reg, scratch1,
3655 scratch2, &transition_elements_kind); 3657 scratch2, &transition_elements_kind);
3656 3658
3657 __ mov(scratch1, Operand(kHoleNanLower32)); 3659 __ mov(scratch1, Operand(kHoleNanLower32));
3658 __ mov(scratch2, Operand(kHoleNanUpper32)); 3660 __ mov(scratch2, Operand(kHoleNanUpper32));
3659 for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) { 3661 for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) {
3660 int offset = FixedDoubleArray::OffsetOfElementAt(i); 3662 int offset = FixedDoubleArray::OffsetOfElementAt(i);
3661 __ str(scratch1, FieldMemOperand(elements_reg, offset)); 3663 __ str(scratch1, FieldMemOperand(elements_reg, offset));
3662 __ str(scratch2, FieldMemOperand(elements_reg, offset + kPointerSize)); 3664 __ str(scratch2, FieldMemOperand(elements_reg, offset + kPointerSize));
3663 } 3665 }
3664 3666
3667 scratch2 = no_reg; // End of scratch2's live range.
3668
3665 // Install the new backing store in the JSArray. 3669 // Install the new backing store in the JSArray.
3666 __ str(elements_reg, 3670 __ str(elements_reg,
3667 FieldMemOperand(receiver_reg, JSObject::kElementsOffset)); 3671 FieldMemOperand(receiver_reg, JSObject::kElementsOffset));
3668 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg, 3672 __ RecordWriteField(receiver_reg, JSObject::kElementsOffset, elements_reg,
3669 scratch1, kLRHasNotBeenSaved, kDontSaveFPRegs, 3673 scratch1, kLRHasNotBeenSaved, kDontSaveFPRegs,
3670 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 3674 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
3671 3675
3672 // Increment the length of the array. 3676 // Increment the length of the array.
3673 __ mov(length_reg, Operand(Smi::FromInt(1))); 3677 __ mov(length_reg, Operand(Smi::FromInt(1)));
3674 __ str(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); 3678 __ str(length_reg, FieldMemOperand(receiver_reg, JSArray::kLengthOffset));
(...skipping 17 matching lines...) Expand all
3692 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3696 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3693 } 3697 }
3694 } 3698 }
3695 3699
3696 3700
3697 #undef __ 3701 #undef __
3698 3702
3699 } } // namespace v8::internal 3703 } } // namespace v8::internal
3700 3704
3701 #endif // V8_TARGET_ARCH_ARM 3705 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698