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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 1692
1693 // v0 = address of new object(s) (tagged) 1693 // v0 = address of new object(s) (tagged)
1694 // a2 = argument count (smi-tagged) 1694 // a2 = argument count (smi-tagged)
1695 // Get the arguments boilerplate from the current native context into t0. 1695 // Get the arguments boilerplate from the current native context into t0.
1696 const int kNormalOffset = 1696 const int kNormalOffset =
1697 Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX); 1697 Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX);
1698 const int kAliasedOffset = 1698 const int kAliasedOffset =
1699 Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX); 1699 Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX);
1700 1700
1701 __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 1701 __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
1702 __ lw(t0, FieldMemOperand(t0, GlobalObject::kNativeContextOffset)); 1702 __ lw(t0, FieldMemOperand(t0, JSGlobalObject::kNativeContextOffset));
1703 Label skip2_ne, skip2_eq; 1703 Label skip2_ne, skip2_eq;
1704 __ Branch(&skip2_ne, ne, t2, Operand(zero_reg)); 1704 __ Branch(&skip2_ne, ne, t2, Operand(zero_reg));
1705 __ lw(t0, MemOperand(t0, kNormalOffset)); 1705 __ lw(t0, MemOperand(t0, kNormalOffset));
1706 __ bind(&skip2_ne); 1706 __ bind(&skip2_ne);
1707 1707
1708 __ Branch(&skip2_eq, eq, t2, Operand(zero_reg)); 1708 __ Branch(&skip2_eq, eq, t2, Operand(zero_reg));
1709 __ lw(t0, MemOperand(t0, kAliasedOffset)); 1709 __ lw(t0, MemOperand(t0, kAliasedOffset));
1710 __ bind(&skip2_eq); 1710 __ bind(&skip2_eq);
1711 1711
1712 // v0 = address of new object (tagged) 1712 // v0 = address of new object (tagged)
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 __ Addu(t5, t5, Operand(FixedArray::kHeaderSize / kPointerSize)); 1896 __ Addu(t5, t5, Operand(FixedArray::kHeaderSize / kPointerSize));
1897 __ bind(&add_arguments_object); 1897 __ bind(&add_arguments_object);
1898 __ Addu(t5, t5, Operand(Heap::kStrictArgumentsObjectSize / kPointerSize)); 1898 __ Addu(t5, t5, Operand(Heap::kStrictArgumentsObjectSize / kPointerSize));
1899 1899
1900 // Do the allocation of both objects in one go. 1900 // Do the allocation of both objects in one go.
1901 __ Allocate(t5, v0, t0, t1, &runtime, 1901 __ Allocate(t5, v0, t0, t1, &runtime,
1902 static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS)); 1902 static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS));
1903 1903
1904 // Get the arguments boilerplate from the current native context. 1904 // Get the arguments boilerplate from the current native context.
1905 __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 1905 __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
1906 __ lw(t0, FieldMemOperand(t0, GlobalObject::kNativeContextOffset)); 1906 __ lw(t0, FieldMemOperand(t0, JSGlobalObject::kNativeContextOffset));
1907 __ lw(t0, MemOperand( 1907 __ lw(t0, MemOperand(
1908 t0, Context::SlotOffset(Context::STRICT_ARGUMENTS_MAP_INDEX))); 1908 t0, Context::SlotOffset(Context::STRICT_ARGUMENTS_MAP_INDEX)));
1909 1909
1910 __ sw(t0, FieldMemOperand(v0, JSObject::kMapOffset)); 1910 __ sw(t0, FieldMemOperand(v0, JSObject::kMapOffset));
1911 __ LoadRoot(t1, Heap::kEmptyFixedArrayRootIndex); 1911 __ LoadRoot(t1, Heap::kEmptyFixedArrayRootIndex);
1912 __ sw(t1, FieldMemOperand(v0, JSObject::kPropertiesOffset)); 1912 __ sw(t1, FieldMemOperand(v0, JSObject::kPropertiesOffset));
1913 __ sw(t1, FieldMemOperand(v0, JSObject::kElementsOffset)); 1913 __ sw(t1, FieldMemOperand(v0, JSObject::kElementsOffset));
1914 1914
1915 // Get the length (smi tagged) and set that as an in-object property too. 1915 // Get the length (smi tagged) and set that as an in-object property too.
1916 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0); 1916 STATIC_ASSERT(Heap::kArgumentsLengthIndex == 0);
(...skipping 3842 matching lines...) Expand 10 before | Expand all | Expand 10 after
5759 MemOperand(fp, 6 * kPointerSize), NULL); 5759 MemOperand(fp, 6 * kPointerSize), NULL);
5760 } 5760 }
5761 5761
5762 5762
5763 #undef __ 5763 #undef __
5764 5764
5765 } // namespace internal 5765 } // namespace internal
5766 } // namespace v8 5766 } // namespace v8
5767 5767
5768 #endif // V8_TARGET_ARCH_MIPS 5768 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698