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 1235153006: [es6] re-implement rest parameters via desugaring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Refactor Scope::TempScope Created 5 years, 5 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 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 __ bind(&done); 1938 __ bind(&done);
1939 __ add(sp, sp, Operand(3 * kPointerSize)); 1939 __ add(sp, sp, Operand(3 * kPointerSize));
1940 __ Ret(); 1940 __ Ret();
1941 1941
1942 // Do the runtime call to allocate the arguments object. 1942 // Do the runtime call to allocate the arguments object.
1943 __ bind(&runtime); 1943 __ bind(&runtime);
1944 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 1944 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
1945 } 1945 }
1946 1946
1947 1947
1948 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
1949 // Stack layout on entry.
1950 // sp[0] : language mode
1951 // sp[4] : index of rest parameter
1952 // sp[8] : number of parameters
1953 // sp[12] : receiver displacement
1954
1955 Label runtime;
1956 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
1957 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset));
1958 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
1959 __ b(ne, &runtime);
1960
1961 // Patch the arguments.length and the parameters pointer.
1962 __ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset));
1963 __ str(r1, MemOperand(sp, 2 * kPointerSize));
1964 __ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1));
1965 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset));
1966 __ str(r3, MemOperand(sp, 3 * kPointerSize));
1967
1968 __ bind(&runtime);
1969 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
1970 }
1971
1972
1973 void RegExpExecStub::Generate(MacroAssembler* masm) { 1948 void RegExpExecStub::Generate(MacroAssembler* masm) {
1974 // Just jump directly to runtime if native RegExp is not selected at compile 1949 // Just jump directly to runtime if native RegExp is not selected at compile
1975 // time or if regexp entry in generated code is turned off runtime switch or 1950 // time or if regexp entry in generated code is turned off runtime switch or
1976 // at compilation. 1951 // at compilation.
1977 #ifdef V8_INTERPRETED_REGEXP 1952 #ifdef V8_INTERPRETED_REGEXP
1978 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 1953 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
1979 #else // V8_INTERPRETED_REGEXP 1954 #else // V8_INTERPRETED_REGEXP
1980 1955
1981 // Stack frame on entry. 1956 // Stack frame on entry.
1982 // sp[0]: last_match_info (expected JSArray) 1957 // sp[0]: last_match_info (expected JSArray)
(...skipping 3393 matching lines...) Expand 10 before | Expand all | Expand 10 after
5376 MemOperand(fp, 6 * kPointerSize), NULL); 5351 MemOperand(fp, 6 * kPointerSize), NULL);
5377 } 5352 }
5378 5353
5379 5354
5380 #undef __ 5355 #undef __
5381 5356
5382 } // namespace internal 5357 } // namespace internal
5383 } // namespace v8 5358 } // namespace v8
5384 5359
5385 #endif // V8_TARGET_ARCH_ARM 5360 #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