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 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1943 __ bind(&done); | 1943 __ bind(&done); |
1944 __ add(sp, sp, Operand(3 * kPointerSize)); | 1944 __ add(sp, sp, Operand(3 * kPointerSize)); |
1945 __ Ret(); | 1945 __ Ret(); |
1946 | 1946 |
1947 // Do the runtime call to allocate the arguments object. | 1947 // Do the runtime call to allocate the arguments object. |
1948 __ bind(&runtime); | 1948 __ bind(&runtime); |
1949 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 1949 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
1950 } | 1950 } |
1951 | 1951 |
1952 | 1952 |
1953 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | |
1954 // Stack layout on entry. | |
1955 // sp[0] : language mode | |
1956 // sp[4] : index of rest parameter | |
1957 // sp[8] : number of parameters | |
1958 // sp[12] : receiver displacement | |
1959 | |
1960 Label runtime; | |
1961 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
1962 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); | |
1963 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
1964 __ b(ne, &runtime); | |
1965 | |
1966 // Patch the arguments.length and the parameters pointer. | |
1967 __ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset)); | |
1968 __ str(r1, MemOperand(sp, 2 * kPointerSize)); | |
1969 __ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1)); | |
1970 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); | |
1971 __ str(r3, MemOperand(sp, 3 * kPointerSize)); | |
1972 | |
1973 __ bind(&runtime); | |
1974 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); | |
1975 } | |
1976 | |
1977 | |
1978 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1953 void RegExpExecStub::Generate(MacroAssembler* masm) { |
1979 // Just jump directly to runtime if native RegExp is not selected at compile | 1954 // Just jump directly to runtime if native RegExp is not selected at compile |
1980 // time or if regexp entry in generated code is turned off runtime switch or | 1955 // time or if regexp entry in generated code is turned off runtime switch or |
1981 // at compilation. | 1956 // at compilation. |
1982 #ifdef V8_INTERPRETED_REGEXP | 1957 #ifdef V8_INTERPRETED_REGEXP |
1983 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 1958 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
1984 #else // V8_INTERPRETED_REGEXP | 1959 #else // V8_INTERPRETED_REGEXP |
1985 | 1960 |
1986 // Stack frame on entry. | 1961 // Stack frame on entry. |
1987 // sp[0]: last_match_info (expected JSArray) | 1962 // sp[0]: last_match_info (expected JSArray) |
(...skipping 3546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5534 MemOperand(fp, 6 * kPointerSize), NULL); | 5509 MemOperand(fp, 6 * kPointerSize), NULL); |
5535 } | 5510 } |
5536 | 5511 |
5537 | 5512 |
5538 #undef __ | 5513 #undef __ |
5539 | 5514 |
5540 } // namespace internal | 5515 } // namespace internal |
5541 } // namespace v8 | 5516 } // namespace v8 |
5542 | 5517 |
5543 #endif // V8_TARGET_ARCH_ARM | 5518 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |