OLD | NEW |
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 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1932 __ bind(&done); | 1932 __ bind(&done); |
1933 __ add(sp, sp, Operand(3 * kPointerSize)); | 1933 __ add(sp, sp, Operand(3 * kPointerSize)); |
1934 __ Ret(); | 1934 __ Ret(); |
1935 | 1935 |
1936 // Do the runtime call to allocate the arguments object. | 1936 // Do the runtime call to allocate the arguments object. |
1937 __ bind(&runtime); | 1937 __ bind(&runtime); |
1938 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 1938 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
1939 } | 1939 } |
1940 | 1940 |
1941 | 1941 |
1942 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | |
1943 // Stack layout on entry. | |
1944 // sp[0] : language mode | |
1945 // sp[4] : index of rest parameter | |
1946 // sp[8] : number of parameters | |
1947 // sp[12] : receiver displacement | |
1948 | |
1949 Label runtime; | |
1950 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
1951 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); | |
1952 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
1953 __ b(ne, &runtime); | |
1954 | |
1955 // Patch the arguments.length and the parameters pointer. | |
1956 __ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset)); | |
1957 __ str(r1, MemOperand(sp, 2 * kPointerSize)); | |
1958 __ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1)); | |
1959 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); | |
1960 __ str(r3, MemOperand(sp, 3 * kPointerSize)); | |
1961 | |
1962 __ bind(&runtime); | |
1963 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); | |
1964 } | |
1965 | |
1966 | |
1967 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1942 void RegExpExecStub::Generate(MacroAssembler* masm) { |
1968 // Just jump directly to runtime if native RegExp is not selected at compile | 1943 // Just jump directly to runtime if native RegExp is not selected at compile |
1969 // time or if regexp entry in generated code is turned off runtime switch or | 1944 // time or if regexp entry in generated code is turned off runtime switch or |
1970 // at compilation. | 1945 // at compilation. |
1971 #ifdef V8_INTERPRETED_REGEXP | 1946 #ifdef V8_INTERPRETED_REGEXP |
1972 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 1947 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
1973 #else // V8_INTERPRETED_REGEXP | 1948 #else // V8_INTERPRETED_REGEXP |
1974 | 1949 |
1975 // Stack frame on entry. | 1950 // Stack frame on entry. |
1976 // sp[0]: last_match_info (expected JSArray) | 1951 // sp[0]: last_match_info (expected JSArray) |
(...skipping 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5366 MemOperand(fp, 6 * kPointerSize), NULL); | 5341 MemOperand(fp, 6 * kPointerSize), NULL); |
5367 } | 5342 } |
5368 | 5343 |
5369 | 5344 |
5370 #undef __ | 5345 #undef __ |
5371 | 5346 |
5372 } // namespace internal | 5347 } // namespace internal |
5373 } // namespace v8 | 5348 } // namespace v8 |
5374 | 5349 |
5375 #endif // V8_TARGET_ARCH_ARM | 5350 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |