| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1694 | 1694 |
| 1695 // v0 = address of new object(s) (tagged) | 1695 // v0 = address of new object(s) (tagged) |
| 1696 // a2 = argument count (smi-tagged) | 1696 // a2 = argument count (smi-tagged) |
| 1697 // Get the arguments boilerplate from the current native context into a4. | 1697 // Get the arguments boilerplate from the current native context into a4. |
| 1698 const int kNormalOffset = | 1698 const int kNormalOffset = |
| 1699 Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX); | 1699 Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX); |
| 1700 const int kAliasedOffset = | 1700 const int kAliasedOffset = |
| 1701 Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX); | 1701 Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX); |
| 1702 | 1702 |
| 1703 __ ld(a4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 1703 __ ld(a4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
| 1704 __ ld(a4, FieldMemOperand(a4, GlobalObject::kNativeContextOffset)); | 1704 __ ld(a4, FieldMemOperand(a4, JSGlobalObject::kNativeContextOffset)); |
| 1705 Label skip2_ne, skip2_eq; | 1705 Label skip2_ne, skip2_eq; |
| 1706 __ Branch(&skip2_ne, ne, a6, Operand(zero_reg)); | 1706 __ Branch(&skip2_ne, ne, a6, Operand(zero_reg)); |
| 1707 __ ld(a4, MemOperand(a4, kNormalOffset)); | 1707 __ ld(a4, MemOperand(a4, kNormalOffset)); |
| 1708 __ bind(&skip2_ne); | 1708 __ bind(&skip2_ne); |
| 1709 | 1709 |
| 1710 __ Branch(&skip2_eq, eq, a6, Operand(zero_reg)); | 1710 __ Branch(&skip2_eq, eq, a6, Operand(zero_reg)); |
| 1711 __ ld(a4, MemOperand(a4, kAliasedOffset)); | 1711 __ ld(a4, MemOperand(a4, kAliasedOffset)); |
| 1712 __ bind(&skip2_eq); | 1712 __ bind(&skip2_eq); |
| 1713 | 1713 |
| 1714 // v0 = address of new object (tagged) | 1714 // v0 = address of new object (tagged) |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 __ Daddu(t1, t1, Operand(FixedArray::kHeaderSize / kPointerSize)); | 1898 __ Daddu(t1, t1, Operand(FixedArray::kHeaderSize / kPointerSize)); |
| 1899 __ bind(&add_arguments_object); | 1899 __ bind(&add_arguments_object); |
| 1900 __ Daddu(t1, t1, Operand(Heap::kStrictArgumentsObjectSize / kPointerSize)); | 1900 __ Daddu(t1, t1, Operand(Heap::kStrictArgumentsObjectSize / kPointerSize)); |
| 1901 | 1901 |
| 1902 // Do the allocation of both objects in one go. | 1902 // Do the allocation of both objects in one go. |
| 1903 __ Allocate(t1, v0, a4, a5, &runtime, | 1903 __ Allocate(t1, v0, a4, a5, &runtime, |
| 1904 static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS)); | 1904 static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS)); |
| 1905 | 1905 |
| 1906 // Get the arguments boilerplate from the current native context. | 1906 // Get the arguments boilerplate from the current native context. |
| 1907 __ ld(a4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 1907 __ ld(a4, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
| 1908 __ ld(a4, FieldMemOperand(a4, GlobalObject::kNativeContextOffset)); | 1908 __ ld(a4, FieldMemOperand(a4, JSGlobalObject::kNativeContextOffset)); |
| 1909 __ ld(a4, MemOperand(a4, Context::SlotOffset( | 1909 __ ld(a4, MemOperand(a4, Context::SlotOffset( |
| 1910 Context::STRICT_ARGUMENTS_MAP_INDEX))); | 1910 Context::STRICT_ARGUMENTS_MAP_INDEX))); |
| 1911 | 1911 |
| 1912 __ sd(a4, FieldMemOperand(v0, JSObject::kMapOffset)); | 1912 __ sd(a4, FieldMemOperand(v0, JSObject::kMapOffset)); |
| 1913 __ LoadRoot(a5, Heap::kEmptyFixedArrayRootIndex); | 1913 __ LoadRoot(a5, Heap::kEmptyFixedArrayRootIndex); |
| 1914 __ sd(a5, FieldMemOperand(v0, JSObject::kPropertiesOffset)); | 1914 __ sd(a5, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
| 1915 __ sd(a5, FieldMemOperand(v0, JSObject::kElementsOffset)); | 1915 __ sd(a5, FieldMemOperand(v0, JSObject::kElementsOffset)); |
| 1916 | 1916 |
| 1917 // Get the length (smi tagged) and set that as an in-object property too. | 1917 // Get the length (smi tagged) and set that as an in-object property too. |
| 1918 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0); | 1918 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0); |
| (...skipping 3873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5792 MemOperand(fp, 6 * kPointerSize), NULL); | 5792 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5793 } | 5793 } |
| 5794 | 5794 |
| 5795 | 5795 |
| 5796 #undef __ | 5796 #undef __ |
| 5797 | 5797 |
| 5798 } // namespace internal | 5798 } // namespace internal |
| 5799 } // namespace v8 | 5799 } // namespace v8 |
| 5800 | 5800 |
| 5801 #endif // V8_TARGET_ARCH_MIPS64 | 5801 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |