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 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1723 __ sub(r4, r4, Operand(Smi::FromInt(1)), SetCC); | 1723 __ sub(r4, r4, Operand(Smi::FromInt(1)), SetCC); |
1724 __ b(lt, &return_undefined); | 1724 __ b(lt, &return_undefined); |
1725 | 1725 |
1726 // Get the last element. | 1726 // Get the last element. |
1727 __ LoadRoot(r6, Heap::kTheHoleValueRootIndex); | 1727 __ LoadRoot(r6, Heap::kTheHoleValueRootIndex); |
1728 STATIC_ASSERT(kSmiTagSize == 1); | 1728 STATIC_ASSERT(kSmiTagSize == 1); |
1729 STATIC_ASSERT(kSmiTag == 0); | 1729 STATIC_ASSERT(kSmiTag == 0); |
1730 // We can't address the last element in one operation. Compute the more | 1730 // We can't address the last element in one operation. Compute the more |
1731 // expensive shift first, and use an offset later on. | 1731 // expensive shift first, and use an offset later on. |
1732 __ add(elements, elements, Operand(r4, LSL, kPointerSizeLog2 - kSmiTagSize)); | 1732 __ add(elements, elements, Operand(r4, LSL, kPointerSizeLog2 - kSmiTagSize)); |
1733 __ ldr(r0, MemOperand(elements, FixedArray::kHeaderSize - kHeapObjectTag)); | 1733 __ ldr(r0, FieldMemOperand(elements, FixedArray::kHeaderSize)); |
1734 __ cmp(r0, r6); | 1734 __ cmp(r0, r6); |
1735 __ b(eq, &call_builtin); | 1735 __ b(eq, &call_builtin); |
1736 | 1736 |
1737 // Set the array's length. | 1737 // Set the array's length. |
1738 __ str(r4, FieldMemOperand(receiver, JSArray::kLengthOffset)); | 1738 __ str(r4, FieldMemOperand(receiver, JSArray::kLengthOffset)); |
1739 | 1739 |
1740 // Fill with the hole. | 1740 // Fill with the hole. |
1741 __ str(r6, MemOperand(elements, FixedArray::kHeaderSize - kHeapObjectTag)); | 1741 __ str(r6, FieldMemOperand(elements, FixedArray::kHeaderSize)); |
1742 __ Drop(argc + 1); | 1742 __ Drop(argc + 1); |
1743 __ Ret(); | 1743 __ Ret(); |
1744 | 1744 |
1745 __ bind(&return_undefined); | 1745 __ bind(&return_undefined); |
1746 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 1746 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
1747 __ Drop(argc + 1); | 1747 __ Drop(argc + 1); |
1748 __ Ret(); | 1748 __ Ret(); |
1749 | 1749 |
1750 __ bind(&call_builtin); | 1750 __ bind(&call_builtin); |
1751 __ TailCallExternalReference(ExternalReference(Builtins::c_ArrayPop, | 1751 __ TailCallExternalReference(ExternalReference(Builtins::c_ArrayPop, |
(...skipping 2694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4446 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4446 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
4447 } | 4447 } |
4448 } | 4448 } |
4449 | 4449 |
4450 | 4450 |
4451 #undef __ | 4451 #undef __ |
4452 | 4452 |
4453 } } // namespace v8::internal | 4453 } } // namespace v8::internal |
4454 | 4454 |
4455 #endif // V8_TARGET_ARCH_ARM | 4455 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |