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

Side by Side Diff: src/mips64/builtins-mips64.cc

Issue 1402943002: [Interpreter] Support for operator new. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix missing receiver slot. Created 5 years, 2 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 | « src/mips/interface-descriptors-mips.cc ('k') | src/mips64/interface-descriptors-mips64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 975
976 976
977 // static 977 // static
978 void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) { 978 void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
979 // ----------- S t a t e ------------- 979 // ----------- S t a t e -------------
980 // -- a0 : the number of arguments (not including the receiver) 980 // -- a0 : the number of arguments (not including the receiver)
981 // -- a2 : the address of the first argument to be pushed. Subsequent 981 // -- a2 : the address of the first argument to be pushed. Subsequent
982 // arguments should be consecutive above this, in the same order as 982 // arguments should be consecutive above this, in the same order as
983 // they are to be pushed onto the stack. 983 // they are to be pushed onto the stack.
984 // -- a1 : the target to call (can be any Object). 984 // -- a1 : the target to call (can be any Object).
985 // -----------------------------------
985 986
986 // Find the address of the last argument. 987 // Find the address of the last argument.
987 __ Daddu(a3, a0, Operand(1)); // Add one for receiver. 988 __ Daddu(a3, a0, Operand(1)); // Add one for receiver.
988 __ dsll(a3, a3, kPointerSizeLog2); 989 __ dsll(a3, a3, kPointerSizeLog2);
989 __ Dsubu(a3, a2, Operand(a3)); 990 __ Dsubu(a3, a2, Operand(a3));
990 991
991 // Push the arguments. 992 // Push the arguments.
992 Label loop_header, loop_check; 993 Label loop_header, loop_check;
993 __ Branch(&loop_check); 994 __ Branch(&loop_check);
994 __ bind(&loop_header); 995 __ bind(&loop_header);
995 __ ld(t0, MemOperand(a2)); 996 __ ld(t0, MemOperand(a2));
996 __ Daddu(a2, a2, Operand(-kPointerSize)); 997 __ Daddu(a2, a2, Operand(-kPointerSize));
997 __ push(t0); 998 __ push(t0);
998 __ bind(&loop_check); 999 __ bind(&loop_check);
999 __ Branch(&loop_header, gt, a2, Operand(a3)); 1000 __ Branch(&loop_header, gt, a2, Operand(a3));
1000 1001
1001 // Call the target. 1002 // Call the target.
1002 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); 1003 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
1003 } 1004 }
1004 1005
1005 1006
1007 // static
1008 void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
1009 // ----------- S t a t e -------------
1010 // -- a0 : argument count (not including receiver)
1011 // -- a3 : original constructor
1012 // -- a1 : constructor to call
1013 // -- a2 : address of the first argument
1014 // -----------------------------------
1015
1016 // Find the address of the last argument.
1017 __ dsll(t0, a0, kPointerSizeLog2);
1018 __ Dsubu(t0, a2, Operand(t0));
1019
1020 // Push a slot for the receiver.
1021 __ push(zero_reg);
1022
1023 // Push the arguments.
1024 Label loop_header, loop_check;
1025 __ Branch(&loop_check);
1026 __ bind(&loop_header);
1027 __ ld(t1, MemOperand(a2));
1028 __ Daddu(a2, a2, Operand(-kPointerSize));
1029 __ push(t1);
1030 __ bind(&loop_check);
1031 __ Branch(&loop_header, gt, a2, Operand(t0));
1032
1033 // Call the constructor with a0, a1, and a3 unmodified.
1034 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL);
1035 }
1036
1037
1006 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { 1038 void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
1007 CallRuntimePassFunction(masm, Runtime::kCompileLazy); 1039 CallRuntimePassFunction(masm, Runtime::kCompileLazy);
1008 GenerateTailCallToReturnedCode(masm); 1040 GenerateTailCallToReturnedCode(masm);
1009 } 1041 }
1010 1042
1011 1043
1012 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) { 1044 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) {
1013 FrameScope scope(masm, StackFrame::INTERNAL); 1045 FrameScope scope(masm, StackFrame::INTERNAL);
1014 // Push a copy of the function onto the stack. 1046 // Push a copy of the function onto the stack.
1015 // Push function as parameter to the runtime call. 1047 // Push function as parameter to the runtime call.
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 } 1933 }
1902 } 1934 }
1903 1935
1904 1936
1905 #undef __ 1937 #undef __
1906 1938
1907 } // namespace internal 1939 } // namespace internal
1908 } // namespace v8 1940 } // namespace v8
1909 1941
1910 #endif // V8_TARGET_ARCH_MIPS64 1942 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/interface-descriptors-mips.cc ('k') | src/mips64/interface-descriptors-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698