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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 __ bind(&done); | 1858 __ bind(&done); |
1859 __ Ret(); | 1859 __ Ret(); |
1860 | 1860 |
1861 // Do the runtime call to allocate the arguments object. | 1861 // Do the runtime call to allocate the arguments object. |
1862 __ bind(&runtime); | 1862 __ bind(&runtime); |
1863 __ Push(r1, r3, r2); | 1863 __ Push(r1, r3, r2); |
1864 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 1864 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
1865 } | 1865 } |
1866 | 1866 |
1867 | 1867 |
| 1868 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
| 1869 // Stack layout on entry. |
| 1870 // sp[0] : language mode |
| 1871 // sp[4] : index of rest parameter |
| 1872 // sp[8] : number of parameters |
| 1873 // sp[12] : receiver displacement |
| 1874 |
| 1875 Label runtime; |
| 1876 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 1877 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); |
| 1878 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 1879 __ b(ne, &runtime); |
| 1880 |
| 1881 // Patch the arguments.length and the parameters pointer. |
| 1882 __ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 1883 __ str(r1, MemOperand(sp, 2 * kPointerSize)); |
| 1884 __ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1)); |
| 1885 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 1886 __ str(r3, MemOperand(sp, 3 * kPointerSize)); |
| 1887 |
| 1888 __ bind(&runtime); |
| 1889 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); |
| 1890 } |
| 1891 |
| 1892 |
1868 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1893 void RegExpExecStub::Generate(MacroAssembler* masm) { |
1869 // Just jump directly to runtime if native RegExp is not selected at compile | 1894 // Just jump directly to runtime if native RegExp is not selected at compile |
1870 // time or if regexp entry in generated code is turned off runtime switch or | 1895 // time or if regexp entry in generated code is turned off runtime switch or |
1871 // at compilation. | 1896 // at compilation. |
1872 #ifdef V8_INTERPRETED_REGEXP | 1897 #ifdef V8_INTERPRETED_REGEXP |
1873 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 1898 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
1874 #else // V8_INTERPRETED_REGEXP | 1899 #else // V8_INTERPRETED_REGEXP |
1875 | 1900 |
1876 // Stack frame on entry. | 1901 // Stack frame on entry. |
1877 // sp[0]: last_match_info (expected JSArray) | 1902 // sp[0]: last_match_info (expected JSArray) |
(...skipping 3497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5375 MemOperand(fp, 6 * kPointerSize), NULL); | 5400 MemOperand(fp, 6 * kPointerSize), NULL); |
5376 } | 5401 } |
5377 | 5402 |
5378 | 5403 |
5379 #undef __ | 5404 #undef __ |
5380 | 5405 |
5381 } // namespace internal | 5406 } // namespace internal |
5382 } // namespace v8 | 5407 } // namespace v8 |
5383 | 5408 |
5384 #endif // V8_TARGET_ARCH_ARM | 5409 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |