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

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

Issue 1318523006: PPC: [es6] Re-implement rest parameters via desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/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 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 __ bind(&done); 1978 __ bind(&done);
1979 __ addi(sp, sp, Operand(3 * kPointerSize)); 1979 __ addi(sp, sp, Operand(3 * kPointerSize));
1980 __ Ret(); 1980 __ Ret();
1981 1981
1982 // Do the runtime call to allocate the arguments object. 1982 // Do the runtime call to allocate the arguments object.
1983 __ bind(&runtime); 1983 __ bind(&runtime);
1984 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 1984 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
1985 } 1985 }
1986 1986
1987 1987
1988 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
1989 // Stack layout on entry.
1990 // sp[0] : language mode
1991 // sp[4] : index of rest parameter
1992 // sp[8] : number of parameters
1993 // sp[12] : receiver displacement
1994
1995 Label runtime;
1996 __ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
1997 __ LoadP(r6, MemOperand(r5, StandardFrameConstants::kContextOffset));
1998 __ CmpSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0);
1999 __ bne(&runtime);
2000
2001 // Patch the arguments.length and the parameters pointer.
2002 __ LoadP(r4, MemOperand(r5, ArgumentsAdaptorFrameConstants::kLengthOffset));
2003 __ StoreP(r4, MemOperand(sp, 2 * kPointerSize));
2004 __ SmiToPtrArrayOffset(r6, r4);
2005 __ add(r6, r5, r6);
2006 __ addi(r6, r6, Operand(StandardFrameConstants::kCallerSPOffset));
2007 __ StoreP(r6, MemOperand(sp, 3 * kPointerSize));
2008
2009 __ bind(&runtime);
2010 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
2011 }
2012
2013
2014 void RegExpExecStub::Generate(MacroAssembler* masm) { 1988 void RegExpExecStub::Generate(MacroAssembler* masm) {
2015 // Just jump directly to runtime if native RegExp is not selected at compile 1989 // Just jump directly to runtime if native RegExp is not selected at compile
2016 // time or if regexp entry in generated code is turned off runtime switch or 1990 // time or if regexp entry in generated code is turned off runtime switch or
2017 // at compilation. 1991 // at compilation.
2018 #ifdef V8_INTERPRETED_REGEXP 1992 #ifdef V8_INTERPRETED_REGEXP
2019 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 1993 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
2020 #else // V8_INTERPRETED_REGEXP 1994 #else // V8_INTERPRETED_REGEXP
2021 1995
2022 // Stack frame on entry. 1996 // Stack frame on entry.
2023 // sp[0]: last_match_info (expected JSArray) 1997 // sp[0]: last_match_info (expected JSArray)
(...skipping 3725 matching lines...) Expand 10 before | Expand all | Expand 10 after
5749 kStackUnwindSpace, NULL, 5723 kStackUnwindSpace, NULL,
5750 MemOperand(fp, 6 * kPointerSize), NULL); 5724 MemOperand(fp, 6 * kPointerSize), NULL);
5751 } 5725 }
5752 5726
5753 5727
5754 #undef __ 5728 #undef __
5755 } // namespace internal 5729 } // namespace internal
5756 } // namespace v8 5730 } // namespace v8
5757 5731
5758 #endif // V8_TARGET_ARCH_PPC 5732 #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