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

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

Issue 1699183002: MIPS64: Fix2 '[runtime] Introduce FastNewStrictArgumentsStub to optimize strict arguments.' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months 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 | « no previous file | no next file » | 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_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 4851 matching lines...) Expand 10 before | Expand all | Expand 10 after
4862 __ Daddu(a3, v0, Operand(FixedArray::kHeaderSize)); 4862 __ Daddu(a3, v0, Operand(FixedArray::kHeaderSize));
4863 { 4863 {
4864 Label loop, done_loop; 4864 Label loop, done_loop;
4865 __ Dlsa(a1, a3, a0, kPointerSizeLog2); 4865 __ Dlsa(a1, a3, a0, kPointerSizeLog2);
4866 __ bind(&loop); 4866 __ bind(&loop);
4867 __ Branch(&done_loop, eq, a1, Operand(a3)); 4867 __ Branch(&done_loop, eq, a1, Operand(a3));
4868 __ ld(at, MemOperand(a2, 0 * kPointerSize)); 4868 __ ld(at, MemOperand(a2, 0 * kPointerSize));
4869 __ sd(at, FieldMemOperand(a3, 0 * kPointerSize)); 4869 __ sd(at, FieldMemOperand(a3, 0 * kPointerSize));
4870 __ Dsubu(a2, a2, Operand(1 * kPointerSize)); 4870 __ Dsubu(a2, a2, Operand(1 * kPointerSize));
4871 __ Daddu(a3, a3, Operand(1 * kPointerSize)); 4871 __ Daddu(a3, a3, Operand(1 * kPointerSize));
4872 __ b(&loop); 4872 __ Branch(&loop);
4873 __ bind(&done_loop); 4873 __ bind(&done_loop);
4874 } 4874 }
4875 4875
4876 // Setup the rest parameter array in a3. 4876 // Setup the rest parameter array in a3.
4877 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, at); 4877 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, at);
4878 __ sd(at, FieldMemOperand(a3, JSArray::kMapOffset)); 4878 __ sd(at, FieldMemOperand(a3, JSArray::kMapOffset));
4879 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); 4879 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex);
4880 __ sd(at, FieldMemOperand(a3, JSArray::kPropertiesOffset)); 4880 __ sd(at, FieldMemOperand(a3, JSArray::kPropertiesOffset));
4881 __ sd(v0, FieldMemOperand(a3, JSArray::kElementsOffset)); 4881 __ sd(v0, FieldMemOperand(a3, JSArray::kElementsOffset));
4882 __ sd(a4, FieldMemOperand(a3, JSArray::kLengthOffset)); 4882 __ sd(a4, FieldMemOperand(a3, JSArray::kLengthOffset));
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
5197 __ bind(&loop); 5197 __ bind(&loop);
5198 __ Branch(&done_loop, eq, a1, Operand(a3)); 5198 __ Branch(&done_loop, eq, a1, Operand(a3));
5199 __ ld(at, MemOperand(a2, 0 * kPointerSize)); 5199 __ ld(at, MemOperand(a2, 0 * kPointerSize));
5200 __ sd(at, FieldMemOperand(a3, 0 * kPointerSize)); 5200 __ sd(at, FieldMemOperand(a3, 0 * kPointerSize));
5201 __ Dsubu(a2, a2, Operand(1 * kPointerSize)); 5201 __ Dsubu(a2, a2, Operand(1 * kPointerSize));
5202 __ Daddu(a3, a3, Operand(1 * kPointerSize)); 5202 __ Daddu(a3, a3, Operand(1 * kPointerSize));
5203 __ Branch(&loop); 5203 __ Branch(&loop);
5204 __ bind(&done_loop); 5204 __ bind(&done_loop);
5205 } 5205 }
5206 5206
5207 // Setup the rest parameter array in a3. 5207 // Setup the strict arguments object in a3.
5208 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, at); 5208 __ LoadNativeContextSlot(Context::STRICT_ARGUMENTS_MAP_INDEX, at);
5209 __ sd(at, FieldMemOperand(a3, JSStrictArgumentsObject::kMapOffset)); 5209 __ sd(at, FieldMemOperand(a3, JSStrictArgumentsObject::kMapOffset));
5210 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); 5210 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex);
5211 __ sd(at, FieldMemOperand(a3, JSStrictArgumentsObject::kPropertiesOffset)); 5211 __ sd(at, FieldMemOperand(a3, JSStrictArgumentsObject::kPropertiesOffset));
5212 __ sd(v0, FieldMemOperand(a3, JSStrictArgumentsObject::kElementsOffset)); 5212 __ sd(v0, FieldMemOperand(a3, JSStrictArgumentsObject::kElementsOffset));
5213 __ sd(a4, FieldMemOperand(a3, JSStrictArgumentsObject::kLengthOffset)); 5213 __ sd(a4, FieldMemOperand(a3, JSStrictArgumentsObject::kLengthOffset));
5214 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); 5214 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize);
5215 __ Ret(USE_DELAY_SLOT); 5215 __ Ret(USE_DELAY_SLOT);
5216 __ mov(v0, a3); // In delay slot 5216 __ mov(v0, a3); // In delay slot
5217 5217
5218 // Fall back to %AllocateInNewSpace. 5218 // Fall back to %AllocateInNewSpace.
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
5689 return_value_operand, NULL); 5689 return_value_operand, NULL);
5690 } 5690 }
5691 5691
5692 5692
5693 #undef __ 5693 #undef __
5694 5694
5695 } // namespace internal 5695 } // namespace internal
5696 } // namespace v8 5696 } // namespace v8
5697 5697
5698 #endif // V8_TARGET_ARCH_MIPS64 5698 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698