| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 __ SmiToInteger64(rcx, rcx); | 831 __ SmiToInteger64(rcx, rcx); |
| 832 __ leap(rdx, Operand(rdx, rcx, times_pointer_size, | 832 __ leap(rdx, Operand(rdx, rcx, times_pointer_size, |
| 833 StandardFrameConstants::kCallerSPOffset)); | 833 StandardFrameConstants::kCallerSPOffset)); |
| 834 __ movp(args.GetArgumentOperand(1), rdx); | 834 __ movp(args.GetArgumentOperand(1), rdx); |
| 835 | 835 |
| 836 __ bind(&runtime); | 836 __ bind(&runtime); |
| 837 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1); | 837 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1); |
| 838 } | 838 } |
| 839 | 839 |
| 840 | 840 |
| 841 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | |
| 842 // rsp[0] : return address | |
| 843 // rsp[8] : language mode | |
| 844 // rsp[16] : index of rest parameter | |
| 845 // rsp[24] : number of parameters | |
| 846 // rsp[32] : receiver displacement | |
| 847 | |
| 848 // Check if the calling frame is an arguments adaptor frame. | |
| 849 Label runtime; | |
| 850 __ movp(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); | |
| 851 __ movp(rcx, Operand(rdx, StandardFrameConstants::kContextOffset)); | |
| 852 __ Cmp(rcx, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | |
| 853 __ j(not_equal, &runtime); | |
| 854 | |
| 855 // Patch the arguments.length and the parameters pointer. | |
| 856 StackArgumentsAccessor args(rsp, 4, ARGUMENTS_DONT_CONTAIN_RECEIVER); | |
| 857 __ movp(rcx, Operand(rdx, ArgumentsAdaptorFrameConstants::kLengthOffset)); | |
| 858 __ movp(args.GetArgumentOperand(1), rcx); | |
| 859 __ SmiToInteger64(rcx, rcx); | |
| 860 __ leap(rdx, Operand(rdx, rcx, times_pointer_size, | |
| 861 StandardFrameConstants::kCallerSPOffset)); | |
| 862 __ movp(args.GetArgumentOperand(0), rdx); | |
| 863 | |
| 864 __ bind(&runtime); | |
| 865 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); | |
| 866 } | |
| 867 | |
| 868 | |
| 869 void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) { | 841 void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) { |
| 870 // Return address is on the stack. | 842 // Return address is on the stack. |
| 871 Label slow; | 843 Label slow; |
| 872 | 844 |
| 873 Register receiver = LoadDescriptor::ReceiverRegister(); | 845 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 874 Register key = LoadDescriptor::NameRegister(); | 846 Register key = LoadDescriptor::NameRegister(); |
| 875 Register scratch = rax; | 847 Register scratch = rax; |
| 876 DCHECK(!scratch.is(receiver) && !scratch.is(key)); | 848 DCHECK(!scratch.is(receiver) && !scratch.is(key)); |
| 877 | 849 |
| 878 // Check that the key is an array index, that is Uint32. | 850 // Check that the key is an array index, that is Uint32. |
| (...skipping 4633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5512 kStackSpace, nullptr, return_value_operand, NULL); | 5484 kStackSpace, nullptr, return_value_operand, NULL); |
| 5513 } | 5485 } |
| 5514 | 5486 |
| 5515 | 5487 |
| 5516 #undef __ | 5488 #undef __ |
| 5517 | 5489 |
| 5518 } // namespace internal | 5490 } // namespace internal |
| 5519 } // namespace v8 | 5491 } // namespace v8 |
| 5520 | 5492 |
| 5521 #endif // V8_TARGET_ARCH_X64 | 5493 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |