| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 // Return and remove the on-stack parameters. | 835 // Return and remove the on-stack parameters. |
| 836 __ bind(&done); | 836 __ bind(&done); |
| 837 __ ret(3 * kPointerSize); | 837 __ ret(3 * kPointerSize); |
| 838 | 838 |
| 839 // Do the runtime call to allocate the arguments object. | 839 // Do the runtime call to allocate the arguments object. |
| 840 __ bind(&runtime); | 840 __ bind(&runtime); |
| 841 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 841 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
| 842 } | 842 } |
| 843 | 843 |
| 844 | 844 |
| 845 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | |
| 846 // esp[0] : return address | |
| 847 // esp[4] : language mode | |
| 848 // esp[8] : index of rest parameter | |
| 849 // esp[12] : number of parameters | |
| 850 // esp[16] : receiver displacement | |
| 851 | |
| 852 // Check if the calling frame is an arguments adaptor frame. | |
| 853 Label runtime; | |
| 854 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); | |
| 855 __ mov(ecx, Operand(edx, StandardFrameConstants::kContextOffset)); | |
| 856 __ cmp(ecx, Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
| 857 __ j(not_equal, &runtime); | |
| 858 | |
| 859 // Patch the arguments.length and the parameters pointer. | |
| 860 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); | |
| 861 __ mov(Operand(esp, 3 * kPointerSize), ecx); | |
| 862 __ lea(edx, Operand(edx, ecx, times_2, | |
| 863 StandardFrameConstants::kCallerSPOffset)); | |
| 864 __ mov(Operand(esp, 4 * kPointerSize), edx); | |
| 865 | |
| 866 __ bind(&runtime); | |
| 867 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); | |
| 868 } | |
| 869 | |
| 870 | |
| 871 void RegExpExecStub::Generate(MacroAssembler* masm) { | 845 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 872 // Just jump directly to runtime if native RegExp is not selected at compile | 846 // Just jump directly to runtime if native RegExp is not selected at compile |
| 873 // time or if regexp entry in generated code is turned off runtime switch or | 847 // time or if regexp entry in generated code is turned off runtime switch or |
| 874 // at compilation. | 848 // at compilation. |
| 875 #ifdef V8_INTERPRETED_REGEXP | 849 #ifdef V8_INTERPRETED_REGEXP |
| 876 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); | 850 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
| 877 #else // V8_INTERPRETED_REGEXP | 851 #else // V8_INTERPRETED_REGEXP |
| 878 | 852 |
| 879 // Stack frame on entry. | 853 // Stack frame on entry. |
| 880 // esp[0]: return address | 854 // esp[0]: return address |
| (...skipping 4371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5252 Operand(ebp, 7 * kPointerSize), NULL); | 5226 Operand(ebp, 7 * kPointerSize), NULL); |
| 5253 } | 5227 } |
| 5254 | 5228 |
| 5255 | 5229 |
| 5256 #undef __ | 5230 #undef __ |
| 5257 | 5231 |
| 5258 } // namespace internal | 5232 } // namespace internal |
| 5259 } // namespace v8 | 5233 } // namespace v8 |
| 5260 | 5234 |
| 5261 #endif // V8_TARGET_ARCH_X87 | 5235 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |