| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1594 | 1594 |
| 1595 // r0 = address of new object(s) (tagged) | 1595 // r0 = address of new object(s) (tagged) |
| 1596 // r2 = argument count (smi-tagged) | 1596 // r2 = argument count (smi-tagged) |
| 1597 // Get the arguments boilerplate from the current native context into r4. | 1597 // Get the arguments boilerplate from the current native context into r4. |
| 1598 const int kNormalOffset = | 1598 const int kNormalOffset = |
| 1599 Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX); | 1599 Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX); |
| 1600 const int kAliasedOffset = | 1600 const int kAliasedOffset = |
| 1601 Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX); | 1601 Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX); |
| 1602 | 1602 |
| 1603 __ ldr(r4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 1603 __ ldr(r4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
| 1604 __ ldr(r4, FieldMemOperand(r4, GlobalObject::kNativeContextOffset)); | 1604 __ ldr(r4, FieldMemOperand(r4, JSGlobalObject::kNativeContextOffset)); |
| 1605 __ cmp(r6, Operand::Zero()); | 1605 __ cmp(r6, Operand::Zero()); |
| 1606 __ ldr(r4, MemOperand(r4, kNormalOffset), eq); | 1606 __ ldr(r4, MemOperand(r4, kNormalOffset), eq); |
| 1607 __ ldr(r4, MemOperand(r4, kAliasedOffset), ne); | 1607 __ ldr(r4, MemOperand(r4, kAliasedOffset), ne); |
| 1608 | 1608 |
| 1609 // r0 = address of new object (tagged) | 1609 // r0 = address of new object (tagged) |
| 1610 // r2 = argument count (smi-tagged) | 1610 // r2 = argument count (smi-tagged) |
| 1611 // r4 = address of arguments map (tagged) | 1611 // r4 = address of arguments map (tagged) |
| 1612 // r6 = mapped parameter count (tagged) | 1612 // r6 = mapped parameter count (tagged) |
| 1613 __ str(r4, FieldMemOperand(r0, JSObject::kMapOffset)); | 1613 __ str(r4, FieldMemOperand(r0, JSObject::kMapOffset)); |
| 1614 __ LoadRoot(r9, Heap::kEmptyFixedArrayRootIndex); | 1614 __ LoadRoot(r9, Heap::kEmptyFixedArrayRootIndex); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1787 __ add(r9, r9, Operand(FixedArray::kHeaderSize / kPointerSize)); | 1787 __ add(r9, r9, Operand(FixedArray::kHeaderSize / kPointerSize)); |
| 1788 __ bind(&add_arguments_object); | 1788 __ bind(&add_arguments_object); |
| 1789 __ add(r9, r9, Operand(Heap::kStrictArgumentsObjectSize / kPointerSize)); | 1789 __ add(r9, r9, Operand(Heap::kStrictArgumentsObjectSize / kPointerSize)); |
| 1790 | 1790 |
| 1791 // Do the allocation of both objects in one go. | 1791 // Do the allocation of both objects in one go. |
| 1792 __ Allocate(r9, r0, r4, r5, &runtime, | 1792 __ Allocate(r9, r0, r4, r5, &runtime, |
| 1793 static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS)); | 1793 static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS)); |
| 1794 | 1794 |
| 1795 // Get the arguments boilerplate from the current native context. | 1795 // Get the arguments boilerplate from the current native context. |
| 1796 __ ldr(r4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 1796 __ ldr(r4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
| 1797 __ ldr(r4, FieldMemOperand(r4, GlobalObject::kNativeContextOffset)); | 1797 __ ldr(r4, FieldMemOperand(r4, JSGlobalObject::kNativeContextOffset)); |
| 1798 __ ldr(r4, MemOperand( | 1798 __ ldr(r4, MemOperand( |
| 1799 r4, Context::SlotOffset(Context::STRICT_ARGUMENTS_MAP_INDEX))); | 1799 r4, Context::SlotOffset(Context::STRICT_ARGUMENTS_MAP_INDEX))); |
| 1800 | 1800 |
| 1801 __ str(r4, FieldMemOperand(r0, JSObject::kMapOffset)); | 1801 __ str(r4, FieldMemOperand(r0, JSObject::kMapOffset)); |
| 1802 __ LoadRoot(r5, Heap::kEmptyFixedArrayRootIndex); | 1802 __ LoadRoot(r5, Heap::kEmptyFixedArrayRootIndex); |
| 1803 __ str(r5, FieldMemOperand(r0, JSObject::kPropertiesOffset)); | 1803 __ str(r5, FieldMemOperand(r0, JSObject::kPropertiesOffset)); |
| 1804 __ str(r5, FieldMemOperand(r0, JSObject::kElementsOffset)); | 1804 __ str(r5, FieldMemOperand(r0, JSObject::kElementsOffset)); |
| 1805 | 1805 |
| 1806 // Get the length (smi tagged) and set that as an in-object property too. | 1806 // Get the length (smi tagged) and set that as an in-object property too. |
| 1807 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0); | 1807 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0); |
| (...skipping 3754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5562 MemOperand(fp, 6 * kPointerSize), NULL); | 5562 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5563 } | 5563 } |
| 5564 | 5564 |
| 5565 | 5565 |
| 5566 #undef __ | 5566 #undef __ |
| 5567 | 5567 |
| 5568 } // namespace internal | 5568 } // namespace internal |
| 5569 } // namespace v8 | 5569 } // namespace v8 |
| 5570 | 5570 |
| 5571 #endif // V8_TARGET_ARCH_ARM | 5571 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |