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 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 | 1796 |
1797 __ bind(&check_double); | 1797 __ bind(&check_double); |
1798 | 1798 |
1799 // Check that the elements are in fast mode and writable. | 1799 // Check that the elements are in fast mode and writable. |
1800 __ CheckMap(elements, | 1800 __ CheckMap(elements, |
1801 a0, | 1801 a0, |
1802 Heap::kFixedDoubleArrayMapRootIndex, | 1802 Heap::kFixedDoubleArrayMapRootIndex, |
1803 &call_builtin, | 1803 &call_builtin, |
1804 DONT_DO_SMI_CHECK); | 1804 DONT_DO_SMI_CHECK); |
1805 | 1805 |
1806 // Get the array's length into r0 and calculate new length. | 1806 // Get the array's length into v0 and calculate new length. |
1807 __ lw(a0, FieldMemOperand(receiver, JSArray::kLengthOffset)); | 1807 __ lw(v0, FieldMemOperand(receiver, JSArray::kLengthOffset)); |
1808 STATIC_ASSERT(kSmiTagSize == 1); | 1808 STATIC_ASSERT(kSmiTagSize == 1); |
1809 STATIC_ASSERT(kSmiTag == 0); | 1809 STATIC_ASSERT(kSmiTag == 0); |
1810 __ Addu(a0, a0, Operand(Smi::FromInt(argc))); | 1810 __ Addu(v0, v0, Operand(Smi::FromInt(argc))); |
1811 | 1811 |
1812 // Get the elements' length. | 1812 // Get the elements' length. |
1813 __ lw(t0, FieldMemOperand(elements, FixedArray::kLengthOffset)); | 1813 __ lw(t0, FieldMemOperand(elements, FixedArray::kLengthOffset)); |
1814 | 1814 |
1815 // Check if we could survive without allocation. | 1815 // Check if we could survive without allocation. |
1816 __ Branch(&call_builtin, gt, a0, Operand(t0)); | 1816 __ Branch(&call_builtin, gt, v0, Operand(t0)); |
1817 | 1817 |
1818 __ lw(t0, MemOperand(sp, (argc - 1) * kPointerSize)); | 1818 __ lw(t0, MemOperand(sp, (argc - 1) * kPointerSize)); |
1819 __ StoreNumberToDoubleElements( | 1819 __ StoreNumberToDoubleElements( |
1820 t0, a0, elements, a3, t1, a2, t5, | 1820 t0, v0, elements, a3, t1, a2, t5, |
1821 &call_builtin, argc * kDoubleSize); | 1821 &call_builtin, argc * kDoubleSize); |
1822 | 1822 |
1823 // Save new length. | 1823 // Save new length. |
1824 __ sw(a0, FieldMemOperand(receiver, JSArray::kLengthOffset)); | 1824 __ sw(v0, FieldMemOperand(receiver, JSArray::kLengthOffset)); |
1825 | 1825 |
1826 // Check for a smi. | 1826 // Check for a smi. |
1827 __ DropAndRet(argc + 1); | 1827 __ DropAndRet(argc + 1); |
1828 | 1828 |
1829 __ bind(&with_write_barrier); | 1829 __ bind(&with_write_barrier); |
1830 | 1830 |
1831 __ lw(a3, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 1831 __ lw(a3, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
1832 | 1832 |
1833 if (FLAG_smi_only_arrays && !FLAG_trace_elements_transitions) { | 1833 if (FLAG_smi_only_arrays && !FLAG_trace_elements_transitions) { |
1834 Label fast_object, not_fast_object; | 1834 Label fast_object, not_fast_object; |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3211 // ----------------------------------- | 3211 // ----------------------------------- |
3212 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3212 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
3213 } | 3213 } |
3214 | 3214 |
3215 | 3215 |
3216 #undef __ | 3216 #undef __ |
3217 | 3217 |
3218 } } // namespace v8::internal | 3218 } } // namespace v8::internal |
3219 | 3219 |
3220 #endif // V8_TARGET_ARCH_MIPS | 3220 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |