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

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

Issue 816913003: Implement ES6 rest parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo in ARM port 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
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 __ bind(&done); 1894 __ bind(&done);
1895 __ add(sp, sp, Operand(3 * kPointerSize)); 1895 __ add(sp, sp, Operand(3 * kPointerSize));
1896 __ Ret(); 1896 __ Ret();
1897 1897
1898 // Do the runtime call to allocate the arguments object. 1898 // Do the runtime call to allocate the arguments object.
1899 __ bind(&runtime); 1899 __ bind(&runtime);
1900 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 1900 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
1901 } 1901 }
1902 1902
1903 1903
1904 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
1905 // Stack layout on entry.
1906 // sp[0] : index of rest parameter
1907 // sp[4] : number of parameters
1908 // sp[8] : receiver displacement
1909
1910 Label runtime;
1911 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
1912 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset));
1913 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
1914 __ b(ne, &runtime);
1915
1916 // Patch the arguments.length and the parameters pointer.
1917 __ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset));
1918 __ str(r1, MemOperand(sp, 1 * kPointerSize));
1919 __ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1));
1920 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset));
1921 __ str(r3, MemOperand(sp, 2 * kPointerSize));
1922
1923 __ bind(&runtime);
1924 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1);
1925 }
1926
1927
1904 void RegExpExecStub::Generate(MacroAssembler* masm) { 1928 void RegExpExecStub::Generate(MacroAssembler* masm) {
1905 // Just jump directly to runtime if native RegExp is not selected at compile 1929 // Just jump directly to runtime if native RegExp is not selected at compile
1906 // time or if regexp entry in generated code is turned off runtime switch or 1930 // time or if regexp entry in generated code is turned off runtime switch or
1907 // at compilation. 1931 // at compilation.
1908 #ifdef V8_INTERPRETED_REGEXP 1932 #ifdef V8_INTERPRETED_REGEXP
1909 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); 1933 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1);
1910 #else // V8_INTERPRETED_REGEXP 1934 #else // V8_INTERPRETED_REGEXP
1911 1935
1912 // Stack frame on entry. 1936 // Stack frame on entry.
1913 // sp[0]: last_match_info (expected JSArray) 1937 // sp[0]: last_match_info (expected JSArray)
(...skipping 3064 matching lines...) Expand 10 before | Expand all | Expand 10 after
4978 kStackUnwindSpace, NULL, 5002 kStackUnwindSpace, NULL,
4979 MemOperand(fp, 6 * kPointerSize), NULL); 5003 MemOperand(fp, 6 * kPointerSize), NULL);
4980 } 5004 }
4981 5005
4982 5006
4983 #undef __ 5007 #undef __
4984 5008
4985 } } // namespace v8::internal 5009 } } // namespace v8::internal
4986 5010
4987 #endif // V8_TARGET_ARCH_ARM 5011 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698