| 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 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1837 __ bind(&done); | 1837 __ bind(&done); |
| 1838 __ add(sp, sp, Operand(3 * kPointerSize)); | 1838 __ add(sp, sp, Operand(3 * kPointerSize)); |
| 1839 __ Ret(); | 1839 __ Ret(); |
| 1840 | 1840 |
| 1841 // Do the runtime call to allocate the arguments object. | 1841 // Do the runtime call to allocate the arguments object. |
| 1842 __ bind(&runtime); | 1842 __ bind(&runtime); |
| 1843 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 1843 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
| 1844 } | 1844 } |
| 1845 | 1845 |
| 1846 | 1846 |
| 1847 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | |
| 1848 // Stack layout on entry. | |
| 1849 // sp[0] : language mode | |
| 1850 // sp[4] : index of rest parameter | |
| 1851 // sp[8] : number of parameters | |
| 1852 // sp[12] : receiver displacement | |
| 1853 | |
| 1854 Label runtime; | |
| 1855 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
| 1856 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); | |
| 1857 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
| 1858 __ b(ne, &runtime); | |
| 1859 | |
| 1860 // Patch the arguments.length and the parameters pointer. | |
| 1861 __ ldr(r1, MemOperand(r2, ArgumentsAdaptorFrameConstants::kLengthOffset)); | |
| 1862 __ str(r1, MemOperand(sp, 2 * kPointerSize)); | |
| 1863 __ add(r3, r2, Operand::PointerOffsetFromSmiKey(r1)); | |
| 1864 __ add(r3, r3, Operand(StandardFrameConstants::kCallerSPOffset)); | |
| 1865 __ str(r3, MemOperand(sp, 3 * kPointerSize)); | |
| 1866 | |
| 1867 __ bind(&runtime); | |
| 1868 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); | |
| 1869 } | |
| 1870 | |
| 1871 | |
| 1872 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1847 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 1873 // Just jump directly to runtime if native RegExp is not selected at compile | 1848 // Just jump directly to runtime if native RegExp is not selected at compile |
| 1874 // time or if regexp entry in generated code is turned off runtime switch or | 1849 // time or if regexp entry in generated code is turned off runtime switch or |
| 1875 // at compilation. | 1850 // at compilation. |
| 1876 #ifdef V8_INTERPRETED_REGEXP | 1851 #ifdef V8_INTERPRETED_REGEXP |
| 1877 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 1852 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
| 1878 #else // V8_INTERPRETED_REGEXP | 1853 #else // V8_INTERPRETED_REGEXP |
| 1879 | 1854 |
| 1880 // Stack frame on entry. | 1855 // Stack frame on entry. |
| 1881 // sp[0]: last_match_info (expected JSArray) | 1856 // sp[0]: last_match_info (expected JSArray) |
| (...skipping 3548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5430 MemOperand(fp, 6 * kPointerSize), NULL); | 5405 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5431 } | 5406 } |
| 5432 | 5407 |
| 5433 | 5408 |
| 5434 #undef __ | 5409 #undef __ |
| 5435 | 5410 |
| 5436 } // namespace internal | 5411 } // namespace internal |
| 5437 } // namespace v8 | 5412 } // namespace v8 |
| 5438 | 5413 |
| 5439 #endif // V8_TARGET_ARCH_ARM | 5414 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |