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

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

Issue 1549743003: PPC: Partial revert of rest parameter desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/full-codegen/ppc/full-codegen-ppc.cc ('k') | 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 // Return. 1980 // Return.
1981 __ Ret(); 1981 __ Ret();
1982 1982
1983 // Do the runtime call to allocate the arguments object. 1983 // Do the runtime call to allocate the arguments object.
1984 __ bind(&runtime); 1984 __ bind(&runtime);
1985 __ Push(r4, r6, r5); 1985 __ Push(r4, r6, r5);
1986 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 1986 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
1987 } 1987 }
1988 1988
1989 1989
1990 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
1991 // Stack layout on entry.
1992 // sp[0] : language mode
1993 // sp[4] : index of rest parameter
1994 // sp[8] : number of parameters
1995 // sp[12] : receiver displacement
1996
1997 Label runtime;
1998 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
1999 __ LoadP(r6, MemOperand(r5, StandardFrameConstants::kContextOffset));
2000 __ CmpSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0);
2001 __ bne(&runtime);
2002
2003 // Patch the arguments.length and the parameters pointer.
2004 __ LoadP(r4, MemOperand(r5, ArgumentsAdaptorFrameConstants::kLengthOffset));
2005 __ StoreP(r4, MemOperand(sp, 2 * kPointerSize));
2006 __ SmiToPtrArrayOffset(r0, r4);
2007 __ add(r6, r5, r0);
2008 __ addi(r6, r6, Operand(StandardFrameConstants::kCallerSPOffset));
2009 __ StoreP(r6, MemOperand(sp, 3 * kPointerSize));
2010
2011 __ bind(&runtime);
2012 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
2013 }
2014
2015
1990 void RegExpExecStub::Generate(MacroAssembler* masm) { 2016 void RegExpExecStub::Generate(MacroAssembler* masm) {
1991 // Just jump directly to runtime if native RegExp is not selected at compile 2017 // Just jump directly to runtime if native RegExp is not selected at compile
1992 // time or if regexp entry in generated code is turned off runtime switch or 2018 // time or if regexp entry in generated code is turned off runtime switch or
1993 // at compilation. 2019 // at compilation.
1994 #ifdef V8_INTERPRETED_REGEXP 2020 #ifdef V8_INTERPRETED_REGEXP
1995 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 2021 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
1996 #else // V8_INTERPRETED_REGEXP 2022 #else // V8_INTERPRETED_REGEXP
1997 2023
1998 // Stack frame on entry. 2024 // Stack frame on entry.
1999 // sp[0]: last_match_info (expected JSArray) 2025 // sp[0]: last_match_info (expected JSArray)
(...skipping 3647 matching lines...) Expand 10 before | Expand all | Expand 10 after
5647 kStackUnwindSpace, NULL, 5673 kStackUnwindSpace, NULL,
5648 MemOperand(fp, 6 * kPointerSize), NULL); 5674 MemOperand(fp, 6 * kPointerSize), NULL);
5649 } 5675 }
5650 5676
5651 5677
5652 #undef __ 5678 #undef __
5653 } // namespace internal 5679 } // namespace internal
5654 } // namespace v8 5680 } // namespace v8
5655 5681
5656 #endif // V8_TARGET_ARCH_PPC 5682 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698