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

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

Issue 1556913002: Use register arguments for RestParamAccessStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 4 years, 11 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/interface-descriptors.cc ('k') | src/mips/interface-descriptors-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 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 __ Ret(); 1960 __ Ret();
1961 1961
1962 // Do the runtime call to allocate the arguments object. 1962 // Do the runtime call to allocate the arguments object.
1963 __ bind(&runtime); 1963 __ bind(&runtime);
1964 __ Push(a1, a3, a2); 1964 __ Push(a1, a3, a2);
1965 __ TailCallRuntime(Runtime::kNewStrictArguments); 1965 __ TailCallRuntime(Runtime::kNewStrictArguments);
1966 } 1966 }
1967 1967
1968 1968
1969 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { 1969 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
1970 // sp[0] : language mode 1970 // a2 : number of parameters (tagged)
1971 // sp[4] : index of rest parameter 1971 // a3 : parameters pointer
1972 // sp[8] : number of parameters 1972 // a1 : rest parameter index (tagged)
1973 // sp[12] : receiver displacement 1973 // a0 : language mode (tagged)
1974 // Check if the calling frame is an arguments adaptor frame. 1974 // Check if the calling frame is an arguments adaptor frame.
1975 1975
1976 Label runtime; 1976 Label runtime;
1977 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 1977 __ lw(t0, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
1978 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); 1978 __ lw(t1, MemOperand(t0, StandardFrameConstants::kContextOffset));
1979 __ Branch(&runtime, ne, a3, 1979 __ Branch(&runtime, ne, t1,
1980 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 1980 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
1981 1981
1982 // Patch the arguments.length and the parameters pointer. 1982 // Patch the arguments.length and the parameters pointer.
1983 __ lw(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); 1983 __ lw(a2, MemOperand(t0, ArgumentsAdaptorFrameConstants::kLengthOffset));
1984 __ sw(a1, MemOperand(sp, 2 * kPointerSize)); 1984 __ sll(t1, a2, kPointerSizeLog2 - kSmiTagSize);
1985 __ sll(at, a1, kPointerSizeLog2 - kSmiTagSize); 1985 __ Addu(a3, t0, Operand(t1));
1986 __ Addu(a3, a2, Operand(at));
1987
1988 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); 1986 __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset));
1989 __ sw(a3, MemOperand(sp, 3 * kPointerSize));
1990 1987
1991 // Do the runtime call to allocate the arguments object. 1988 // Do the runtime call to allocate the arguments object.
1992 __ bind(&runtime); 1989 __ bind(&runtime);
1990 __ Push(a2, a3, a1, a0);
1993 __ TailCallRuntime(Runtime::kNewRestParam); 1991 __ TailCallRuntime(Runtime::kNewRestParam);
1994 } 1992 }
1995 1993
1996 1994
1997 void RegExpExecStub::Generate(MacroAssembler* masm) { 1995 void RegExpExecStub::Generate(MacroAssembler* masm) {
1998 // Just jump directly to runtime if native RegExp is not selected at compile 1996 // Just jump directly to runtime if native RegExp is not selected at compile
1999 // time or if regexp entry in generated code is turned off runtime switch or 1997 // time or if regexp entry in generated code is turned off runtime switch or
2000 // at compilation. 1998 // at compilation.
2001 #ifdef V8_INTERPRETED_REGEXP 1999 #ifdef V8_INTERPRETED_REGEXP
2002 __ TailCallRuntime(Runtime::kRegExpExec); 2000 __ TailCallRuntime(Runtime::kRegExpExec);
(...skipping 3591 matching lines...) Expand 10 before | Expand all | Expand 10 after
5594 MemOperand(fp, 6 * kPointerSize), NULL); 5592 MemOperand(fp, 6 * kPointerSize), NULL);
5595 } 5593 }
5596 5594
5597 5595
5598 #undef __ 5596 #undef __
5599 5597
5600 } // namespace internal 5598 } // namespace internal
5601 } // namespace v8 5599 } // namespace v8
5602 5600
5603 #endif // V8_TARGET_ARCH_MIPS 5601 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/interface-descriptors.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698