| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler/code-assembler.h" | 5 #include "src/compiler/code-assembler.h" |
| 6 | 6 |
| 7 #include <ostream> | 7 #include <ostream> |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 } | 713 } |
| 714 | 714 |
| 715 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context, | 715 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context, |
| 716 Node* arg1, Node* arg2, Node* arg3, | 716 Node* arg1, Node* arg2, Node* arg3, |
| 717 Node* arg4, size_t result_size) { | 717 Node* arg4, size_t result_size) { |
| 718 Node* target = HeapConstant(callable.code()); | 718 Node* target = HeapConstant(callable.code()); |
| 719 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, arg3, | 719 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, arg3, |
| 720 arg4, result_size); | 720 arg4, result_size); |
| 721 } | 721 } |
| 722 | 722 |
| 723 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context, |
| 724 Node* arg1, Node* arg2, Node* arg3, |
| 725 Node* arg4, Node* arg5, size_t result_size) { |
| 726 Node* target = HeapConstant(callable.code()); |
| 727 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, arg3, |
| 728 arg4, arg5, result_size); |
| 729 } |
| 730 |
| 723 Node* CodeAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor, | 731 Node* CodeAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor, |
| 724 Node* target, Node* context, Node* arg1, | 732 Node* target, Node* context, Node* arg1, |
| 725 size_t result_size) { | 733 size_t result_size) { |
| 726 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( | 734 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( |
| 727 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), | 735 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), |
| 728 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties, | 736 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties, |
| 729 MachineType::AnyTagged(), result_size); | 737 MachineType::AnyTagged(), result_size); |
| 730 | 738 |
| 731 Node** args = zone()->NewArray<Node*>(2); | 739 Node** args = zone()->NewArray<Node*>(2); |
| 732 args[0] = arg1; | 740 args[0] = arg1; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 args[1] = arg2; | 809 args[1] = arg2; |
| 802 args[2] = arg3; | 810 args[2] = arg3; |
| 803 args[3] = arg4; | 811 args[3] = arg4; |
| 804 args[4] = arg5; | 812 args[4] = arg5; |
| 805 args[5] = context; | 813 args[5] = context; |
| 806 | 814 |
| 807 return raw_assembler_->TailCallN(call_descriptor, target, args); | 815 return raw_assembler_->TailCallN(call_descriptor, target, args); |
| 808 } | 816 } |
| 809 | 817 |
| 810 Node* CodeAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor, | 818 Node* CodeAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor, |
| 819 Node* target, Node* context, Node* arg1, |
| 820 Node* arg2, Node* arg3, Node* arg4, |
| 821 Node* arg5, Node* arg6, size_t result_size) { |
| 822 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( |
| 823 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), |
| 824 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties, |
| 825 MachineType::AnyTagged(), result_size); |
| 826 |
| 827 Node** args = zone()->NewArray<Node*>(7); |
| 828 args[0] = arg1; |
| 829 args[1] = arg2; |
| 830 args[2] = arg3; |
| 831 args[3] = arg4; |
| 832 args[4] = arg5; |
| 833 args[5] = arg6; |
| 834 args[6] = context; |
| 835 |
| 836 return raw_assembler_->TailCallN(call_descriptor, target, args); |
| 837 } |
| 838 |
| 839 Node* CodeAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor, |
| 811 Node* target, Node* context, const Arg& arg1, | 840 Node* target, Node* context, const Arg& arg1, |
| 812 const Arg& arg2, const Arg& arg3, | 841 const Arg& arg2, const Arg& arg3, |
| 813 const Arg& arg4, size_t result_size) { | 842 const Arg& arg4, size_t result_size) { |
| 814 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( | 843 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( |
| 815 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), | 844 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), |
| 816 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties, | 845 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties, |
| 817 MachineType::AnyTagged(), result_size); | 846 MachineType::AnyTagged(), result_size); |
| 818 | 847 |
| 819 const int kArgsCount = 5; | 848 const int kArgsCount = 5; |
| 820 Node** args = zone()->NewArray<Node*>(kArgsCount); | 849 Node** args = zone()->NewArray<Node*>(kArgsCount); |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 } | 1160 } |
| 1132 } | 1161 } |
| 1133 } | 1162 } |
| 1134 | 1163 |
| 1135 bound_ = true; | 1164 bound_ = true; |
| 1136 } | 1165 } |
| 1137 | 1166 |
| 1138 } // namespace compiler | 1167 } // namespace compiler |
| 1139 } // namespace internal | 1168 } // namespace internal |
| 1140 } // namespace v8 | 1169 } // namespace v8 |
| OLD | NEW |