Chromium Code Reviews| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 834 __ SmiToInteger64(rcx, rcx); | 834 __ SmiToInteger64(rcx, rcx); |
| 835 __ leap(rdx, Operand(rdx, rcx, times_pointer_size, | 835 __ leap(rdx, Operand(rdx, rcx, times_pointer_size, |
| 836 StandardFrameConstants::kCallerSPOffset)); | 836 StandardFrameConstants::kCallerSPOffset)); |
| 837 __ movp(args.GetArgumentOperand(1), rdx); | 837 __ movp(args.GetArgumentOperand(1), rdx); |
| 838 | 838 |
| 839 __ bind(&runtime); | 839 __ bind(&runtime); |
| 840 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1); | 840 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1); |
| 841 } | 841 } |
| 842 | 842 |
| 843 | 843 |
| 844 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { | |
| 845 // rsp[0] : return address | |
| 846 // rsp[8] : index of rest parameter | |
| 847 // rsp[16] : number of parameters | |
| 848 // rsp[24] : receiver displacement | |
| 849 // | |
|
arv (Not doing code reviews)
2015/02/13 16:56:44
remove empty line
| |
| 850 | |
| 851 // Check if the calling frame is an arguments adaptor frame. | |
| 852 Label runtime; | |
| 853 __ movp(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); | |
| 854 __ movp(rcx, Operand(rdx, StandardFrameConstants::kContextOffset)); | |
| 855 __ Cmp(rcx, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | |
| 856 __ j(not_equal, &runtime); | |
| 857 | |
| 858 // Patch the arguments.length and the parameters pointer. | |
| 859 StackArgumentsAccessor args(rsp, 3, ARGUMENTS_DONT_CONTAIN_RECEIVER); | |
| 860 __ movp(rcx, Operand(rdx, ArgumentsAdaptorFrameConstants::kLengthOffset)); | |
| 861 __ movp(args.GetArgumentOperand(1), rcx); | |
| 862 __ SmiToInteger64(rcx, rcx); | |
| 863 __ leap(rdx, Operand(rdx, rcx, times_pointer_size, | |
| 864 StandardFrameConstants::kCallerSPOffset)); | |
| 865 __ movp(args.GetArgumentOperand(0), rdx); | |
| 866 | |
| 867 __ bind(&runtime); | |
| 868 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); | |
| 869 } | |
| 870 | |
| 871 | |
| 844 void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) { | 872 void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) { |
| 845 // Return address is on the stack. | 873 // Return address is on the stack. |
| 846 Label slow; | 874 Label slow; |
| 847 | 875 |
| 848 Register receiver = LoadDescriptor::ReceiverRegister(); | 876 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 849 Register key = LoadDescriptor::NameRegister(); | 877 Register key = LoadDescriptor::NameRegister(); |
| 850 Register scratch = rax; | 878 Register scratch = rax; |
| 851 DCHECK(!scratch.is(receiver) && !scratch.is(key)); | 879 DCHECK(!scratch.is(receiver) && !scratch.is(key)); |
| 852 | 880 |
| 853 // Check that the key is an array index, that is Uint32. | 881 // Check that the key is an array index, that is Uint32. |
| (...skipping 4200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5054 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg, | 5082 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg, |
| 5055 kStackSpace, nullptr, return_value_operand, NULL); | 5083 kStackSpace, nullptr, return_value_operand, NULL); |
| 5056 } | 5084 } |
| 5057 | 5085 |
| 5058 | 5086 |
| 5059 #undef __ | 5087 #undef __ |
| 5060 | 5088 |
| 5061 } } // namespace v8::internal | 5089 } } // namespace v8::internal |
| 5062 | 5090 |
| 5063 #endif // V8_TARGET_ARCH_X64 | 5091 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |