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

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

Issue 816913003: Implement ES6 rest parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix up the typos/pointless newline Created 5 years, 10 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
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 // Return and remove the on-stack parameters. 2006 // Return and remove the on-stack parameters.
2007 __ bind(&done); 2007 __ bind(&done);
2008 __ DropAndRet(3); 2008 __ DropAndRet(3);
2009 2009
2010 // Do the runtime call to allocate the arguments object. 2010 // Do the runtime call to allocate the arguments object.
2011 __ bind(&runtime); 2011 __ bind(&runtime);
2012 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 2012 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
2013 } 2013 }
2014 2014
2015 2015
2016 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
2017 // sp[0] : index of rest parameter
2018 // sp[4] : number of parameters
2019 // sp[8] : receiver displacement
2020 // Check if the calling frame is an arguments adaptor frame.
2021 Label runtime;
2022 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
2023 __ ld(a3, MemOperand(a2, StandardFrameConstants::kContextOffset));
2024 __ Branch(&runtime, ne, a3,
2025 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
2026
2027 // Patch the arguments.length and the parameters pointer.
2028 __ ld(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset));
2029 __ sd(a1, MemOperand(sp, 1 * kPointerSize));
2030 __ SmiScale(at, a1, kPointerSizeLog2);
2031
2032 __ Daddu(a3, a2, Operand(at));
2033
2034 __ Daddu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset));
2035 __ sd(a3, MemOperand(sp, 2 * kPointerSize));
2036
2037 // Do the runtime call to allocate the arguments object.
2038 __ bind(&runtime);
2039 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1);
2040 }
2041
2042
2016 void RegExpExecStub::Generate(MacroAssembler* masm) { 2043 void RegExpExecStub::Generate(MacroAssembler* masm) {
2017 // Just jump directly to runtime if native RegExp is not selected at compile 2044 // Just jump directly to runtime if native RegExp is not selected at compile
2018 // time or if regexp entry in generated code is turned off runtime switch or 2045 // time or if regexp entry in generated code is turned off runtime switch or
2019 // at compilation. 2046 // at compilation.
2020 #ifdef V8_INTERPRETED_REGEXP 2047 #ifdef V8_INTERPRETED_REGEXP
2021 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); 2048 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1);
2022 #else // V8_INTERPRETED_REGEXP 2049 #else // V8_INTERPRETED_REGEXP
2023 2050
2024 // Stack frame on entry. 2051 // Stack frame on entry.
2025 // sp[0]: last_match_info (expected JSArray) 2052 // sp[0]: last_match_info (expected JSArray)
(...skipping 3183 matching lines...) Expand 10 before | Expand all | Expand 10 after
5209 kStackUnwindSpace, kInvalidStackOffset, 5236 kStackUnwindSpace, kInvalidStackOffset,
5210 MemOperand(fp, 6 * kPointerSize), NULL); 5237 MemOperand(fp, 6 * kPointerSize), NULL);
5211 } 5238 }
5212 5239
5213 5240
5214 #undef __ 5241 #undef __
5215 5242
5216 } } // namespace v8::internal 5243 } } // namespace v8::internal
5217 5244
5218 #endif // V8_TARGET_ARCH_MIPS64 5245 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips64/full-codegen-mips64.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698