OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef V8_CALL_INTERFACE_DESCRIPTOR_H_ | 5 #ifndef V8_CALL_INTERFACE_DESCRIPTOR_H_ |
6 #define V8_CALL_INTERFACE_DESCRIPTOR_H_ | 6 #define V8_CALL_INTERFACE_DESCRIPTOR_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 V(ApiAccessor) \ | 69 V(ApiAccessor) \ |
70 V(ApiGetter) \ | 70 V(ApiGetter) \ |
71 V(ArgumentsAccessRead) \ | 71 V(ArgumentsAccessRead) \ |
72 V(ArgumentsAccessNew) \ | 72 V(ArgumentsAccessNew) \ |
73 V(LoadGlobalViaContext) \ | 73 V(LoadGlobalViaContext) \ |
74 V(StoreGlobalViaContext) \ | 74 V(StoreGlobalViaContext) \ |
75 V(MathPowTagged) \ | 75 V(MathPowTagged) \ |
76 V(MathPowInteger) \ | 76 V(MathPowInteger) \ |
77 V(ContextOnly) \ | 77 V(ContextOnly) \ |
78 V(GrowArrayElements) \ | 78 V(GrowArrayElements) \ |
| 79 V(InterpreterDispatch) \ |
79 V(InterpreterPushArgsAndCall) \ | 80 V(InterpreterPushArgsAndCall) \ |
80 V(InterpreterPushArgsAndConstruct) \ | 81 V(InterpreterPushArgsAndConstruct) \ |
81 V(InterpreterCEntry) | 82 V(InterpreterCEntry) |
82 | 83 |
83 class CallInterfaceDescriptorData { | 84 class CallInterfaceDescriptorData { |
84 public: | 85 public: |
85 CallInterfaceDescriptorData() | 86 CallInterfaceDescriptorData() |
86 : register_param_count_(-1), function_type_(nullptr) {} | 87 : register_param_count_(-1), function_type_(nullptr) {} |
87 | 88 |
88 // A copy of the passed in registers and param_representations is made | 89 // A copy of the passed in registers and param_representations is made |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 | 746 |
746 class GrowArrayElementsDescriptor : public CallInterfaceDescriptor { | 747 class GrowArrayElementsDescriptor : public CallInterfaceDescriptor { |
747 public: | 748 public: |
748 DECLARE_DESCRIPTOR(GrowArrayElementsDescriptor, CallInterfaceDescriptor) | 749 DECLARE_DESCRIPTOR(GrowArrayElementsDescriptor, CallInterfaceDescriptor) |
749 | 750 |
750 enum RegisterInfo { kObjectIndex, kKeyIndex }; | 751 enum RegisterInfo { kObjectIndex, kKeyIndex }; |
751 static const Register ObjectRegister(); | 752 static const Register ObjectRegister(); |
752 static const Register KeyRegister(); | 753 static const Register KeyRegister(); |
753 }; | 754 }; |
754 | 755 |
| 756 class InterpreterDispatchDescriptor : public CallInterfaceDescriptor { |
| 757 public: |
| 758 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(InterpreterDispatchDescriptor, |
| 759 CallInterfaceDescriptor) |
| 760 |
| 761 static const int kAccumulatorParameter = 0; |
| 762 static const int kRegisterFileParameter = 1; |
| 763 static const int kBytecodeOffsetParameter = 2; |
| 764 static const int kBytecodeArrayParameter = 3; |
| 765 static const int kDispatchTableParameter = 4; |
| 766 static const int kContextParameter = 5; |
| 767 }; |
755 | 768 |
756 class InterpreterPushArgsAndCallDescriptor : public CallInterfaceDescriptor { | 769 class InterpreterPushArgsAndCallDescriptor : public CallInterfaceDescriptor { |
757 public: | 770 public: |
758 DECLARE_DESCRIPTOR(InterpreterPushArgsAndCallDescriptor, | 771 DECLARE_DESCRIPTOR(InterpreterPushArgsAndCallDescriptor, |
759 CallInterfaceDescriptor) | 772 CallInterfaceDescriptor) |
760 }; | 773 }; |
761 | 774 |
762 | 775 |
763 class InterpreterPushArgsAndConstructDescriptor | 776 class InterpreterPushArgsAndConstructDescriptor |
764 : public CallInterfaceDescriptor { | 777 : public CallInterfaceDescriptor { |
765 public: | 778 public: |
766 DECLARE_DESCRIPTOR(InterpreterPushArgsAndConstructDescriptor, | 779 DECLARE_DESCRIPTOR(InterpreterPushArgsAndConstructDescriptor, |
767 CallInterfaceDescriptor) | 780 CallInterfaceDescriptor) |
768 }; | 781 }; |
769 | 782 |
770 | 783 |
771 class InterpreterCEntryDescriptor : public CallInterfaceDescriptor { | 784 class InterpreterCEntryDescriptor : public CallInterfaceDescriptor { |
772 public: | 785 public: |
773 DECLARE_DESCRIPTOR(InterpreterCEntryDescriptor, CallInterfaceDescriptor) | 786 DECLARE_DESCRIPTOR(InterpreterCEntryDescriptor, CallInterfaceDescriptor) |
774 }; | 787 }; |
775 | 788 |
776 | |
777 #undef DECLARE_DESCRIPTOR | 789 #undef DECLARE_DESCRIPTOR |
778 | 790 |
779 | 791 |
780 // We define the association between CallDescriptors::Key and the specialized | 792 // We define the association between CallDescriptors::Key and the specialized |
781 // descriptor here to reduce boilerplate and mistakes. | 793 // descriptor here to reduce boilerplate and mistakes. |
782 #define DEF_KEY(name) \ | 794 #define DEF_KEY(name) \ |
783 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } | 795 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } |
784 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) | 796 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) |
785 #undef DEF_KEY | 797 #undef DEF_KEY |
786 } // namespace internal | 798 } // namespace internal |
787 } // namespace v8 | 799 } // namespace v8 |
788 | 800 |
789 | 801 |
790 #if V8_TARGET_ARCH_ARM64 | 802 #if V8_TARGET_ARCH_ARM64 |
791 #include "src/arm64/interface-descriptors-arm64.h" | 803 #include "src/arm64/interface-descriptors-arm64.h" |
792 #elif V8_TARGET_ARCH_ARM | 804 #elif V8_TARGET_ARCH_ARM |
793 #include "src/arm/interface-descriptors-arm.h" | 805 #include "src/arm/interface-descriptors-arm.h" |
794 #endif | 806 #endif |
795 | 807 |
796 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 808 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
OLD | NEW |