| 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 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 __ Ret(); | 1946 __ Ret(); |
| 1947 | 1947 |
| 1948 // Do the runtime call to allocate the arguments object. | 1948 // Do the runtime call to allocate the arguments object. |
| 1949 __ bind(&runtime); | 1949 __ bind(&runtime); |
| 1950 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 1950 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
| 1951 } | 1951 } |
| 1952 | 1952 |
| 1953 | 1953 |
| 1954 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | 1954 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
| 1955 // Stack layout on entry. | 1955 // Stack layout on entry. |
| 1956 // sp[0] : index of rest parameter | 1956 // sp[0] : language mode |
| 1957 // sp[4] : number of parameters | 1957 // sp[4] : index of rest parameter |
| 1958 // sp[8] : receiver displacement | 1958 // sp[8] : number of parameters |
| 1959 // sp[12] : receiver displacement |
| 1959 | 1960 |
| 1960 Label runtime; | 1961 Label runtime; |
| 1961 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 1962 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 1962 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); | 1963 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); |
| 1963 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 1964 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 1964 __ b(ne, &runtime); | 1965 __ b(ne, &runtime); |
| 1965 | 1966 |
| 1966 // Patch the arguments.length and the parameters pointer. | 1967 // Patch the arguments.length and the parameters pointer. |
| 1967 __ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 1968 __ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 1968 __ str(r1, MemOperand(sp, 1 * kPointerSize)); | 1969 __ str(r1, MemOperand(sp, 2 * kPointerSize)); |
| 1969 __ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1)); | 1970 __ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1)); |
| 1970 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); | 1971 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 1971 __ str(r3, MemOperand(sp, 2 * kPointerSize)); | 1972 __ str(r3, MemOperand(sp, 3 * kPointerSize)); |
| 1972 | 1973 |
| 1973 __ bind(&runtime); | 1974 __ bind(&runtime); |
| 1974 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); | 1975 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); |
| 1975 } | 1976 } |
| 1976 | 1977 |
| 1977 | 1978 |
| 1978 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1979 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 1979 // Just jump directly to runtime if native RegExp is not selected at compile | 1980 // 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 | 1981 // time or if regexp entry in generated code is turned off runtime switch or |
| 1981 // at compilation. | 1982 // at compilation. |
| 1982 #ifdef V8_INTERPRETED_REGEXP | 1983 #ifdef V8_INTERPRETED_REGEXP |
| 1983 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 1984 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
| 1984 #else // V8_INTERPRETED_REGEXP | 1985 #else // V8_INTERPRETED_REGEXP |
| (...skipping 3372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5357 kStackUnwindSpace, NULL, | 5358 kStackUnwindSpace, NULL, |
| 5358 MemOperand(fp, 6 * kPointerSize), NULL); | 5359 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5359 } | 5360 } |
| 5360 | 5361 |
| 5361 | 5362 |
| 5362 #undef __ | 5363 #undef __ |
| 5363 | 5364 |
| 5364 } } // namespace v8::internal | 5365 } } // namespace v8::internal |
| 5365 | 5366 |
| 5366 #endif // V8_TARGET_ARCH_ARM | 5367 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |