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

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

Issue 1537683002: Partial revert of rest parameter desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test failures. Created 5 years 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/code-stubs-mips.cc ('k') | src/parsing/parser.h » ('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/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 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 __ bind(&done); 1972 __ bind(&done);
1973 __ Ret(); 1973 __ Ret();
1974 1974
1975 // Do the runtime call to allocate the arguments object. 1975 // Do the runtime call to allocate the arguments object.
1976 __ bind(&runtime); 1976 __ bind(&runtime);
1977 __ Push(a1, a3, a2); 1977 __ Push(a1, a3, a2);
1978 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 1978 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
1979 } 1979 }
1980 1980
1981 1981
1982 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
1983 // sp[0] : language mode
1984 // sp[4] : index of rest parameter
1985 // sp[8] : number of parameters
1986 // sp[12] : receiver displacement
1987 // Check if the calling frame is an arguments adaptor frame.
1988
1989 Label runtime;
1990 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
1991 __ ld(a3, MemOperand(a2, StandardFrameConstants::kContextOffset));
1992 __ Branch(&runtime, ne, a3,
1993 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
1994
1995 // Patch the arguments.length and the parameters pointer.
1996 __ ld(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset));
1997 __ sd(a1, MemOperand(sp, 2 * kPointerSize));
1998 __ SmiScale(at, a1, kPointerSizeLog2);
1999
2000 __ Daddu(a3, a2, Operand(at));
2001
2002 __ Daddu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset));
2003 __ sd(a3, MemOperand(sp, 3 * kPointerSize));
2004
2005 // Do the runtime call to allocate the arguments object.
2006 __ bind(&runtime);
2007 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
2008 }
2009
2010
1982 void RegExpExecStub::Generate(MacroAssembler* masm) { 2011 void RegExpExecStub::Generate(MacroAssembler* masm) {
1983 // Just jump directly to runtime if native RegExp is not selected at compile 2012 // Just jump directly to runtime if native RegExp is not selected at compile
1984 // time or if regexp entry in generated code is turned off runtime switch or 2013 // time or if regexp entry in generated code is turned off runtime switch or
1985 // at compilation. 2014 // at compilation.
1986 #ifdef V8_INTERPRETED_REGEXP 2015 #ifdef V8_INTERPRETED_REGEXP
1987 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 2016 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
1988 #else // V8_INTERPRETED_REGEXP 2017 #else // V8_INTERPRETED_REGEXP
1989 2018
1990 // Stack frame on entry. 2019 // Stack frame on entry.
1991 // sp[0]: last_match_info (expected JSArray) 2020 // sp[0]: last_match_info (expected JSArray)
(...skipping 3616 matching lines...) Expand 10 before | Expand all | Expand 10 after
5608 MemOperand(fp, 6 * kPointerSize), NULL); 5637 MemOperand(fp, 6 * kPointerSize), NULL);
5609 } 5638 }
5610 5639
5611 5640
5612 #undef __ 5641 #undef __
5613 5642
5614 } // namespace internal 5643 } // namespace internal
5615 } // namespace v8 5644 } // namespace v8
5616 5645
5617 #endif // V8_TARGET_ARCH_MIPS64 5646 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698