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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 V(LoadGlobalViaContext) \ | 86 V(LoadGlobalViaContext) \ |
87 V(StoreGlobalViaContext) \ | 87 V(StoreGlobalViaContext) \ |
88 V(MathPowTagged) \ | 88 V(MathPowTagged) \ |
89 V(MathPowInteger) \ | 89 V(MathPowInteger) \ |
90 V(ContextOnly) \ | 90 V(ContextOnly) \ |
91 V(GrowArrayElements) \ | 91 V(GrowArrayElements) \ |
92 V(InterpreterDispatch) \ | 92 V(InterpreterDispatch) \ |
93 V(InterpreterPushArgsAndCall) \ | 93 V(InterpreterPushArgsAndCall) \ |
94 V(InterpreterPushArgsAndConstruct) \ | 94 V(InterpreterPushArgsAndConstruct) \ |
95 V(InterpreterCEntry) \ | 95 V(InterpreterCEntry) \ |
96 V(ResumeGenerator) | 96 V(ResumeGenerator) \ |
97 V(AsyncFunctionResume) | |
97 | 98 |
98 class CallInterfaceDescriptorData { | 99 class CallInterfaceDescriptorData { |
99 public: | 100 public: |
100 CallInterfaceDescriptorData() | 101 CallInterfaceDescriptorData() |
101 : register_param_count_(-1), function_type_(nullptr) {} | 102 : register_param_count_(-1), function_type_(nullptr) {} |
102 | 103 |
103 // A copy of the passed in registers and param_representations is made | 104 // A copy of the passed in registers and param_representations is made |
104 // and owned by the CallInterfaceDescriptorData. | 105 // and owned by the CallInterfaceDescriptorData. |
105 | 106 |
106 void InitializePlatformIndependent(FunctionType* function_type) { | 107 void InitializePlatformIndependent(FunctionType* function_type) { |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
840 class InterpreterCEntryDescriptor : public CallInterfaceDescriptor { | 841 class InterpreterCEntryDescriptor : public CallInterfaceDescriptor { |
841 public: | 842 public: |
842 DECLARE_DESCRIPTOR(InterpreterCEntryDescriptor, CallInterfaceDescriptor) | 843 DECLARE_DESCRIPTOR(InterpreterCEntryDescriptor, CallInterfaceDescriptor) |
843 }; | 844 }; |
844 | 845 |
845 class ResumeGeneratorDescriptor final : public CallInterfaceDescriptor { | 846 class ResumeGeneratorDescriptor final : public CallInterfaceDescriptor { |
846 public: | 847 public: |
847 DECLARE_DESCRIPTOR(ResumeGeneratorDescriptor, CallInterfaceDescriptor) | 848 DECLARE_DESCRIPTOR(ResumeGeneratorDescriptor, CallInterfaceDescriptor) |
848 }; | 849 }; |
849 | 850 |
851 class AsyncFunctionResumeDescriptor final : public CallInterfaceDescriptor { | |
852 public: | |
853 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(AsyncFunctionResumeDescriptor, | |
caitp (gmail)
2016/05/04 01:24:17
If it's possible at all to mimic JS linkage with C
| |
854 CallInterfaceDescriptor) | |
855 }; | |
856 | |
850 #undef DECLARE_DESCRIPTOR_WITH_BASE | 857 #undef DECLARE_DESCRIPTOR_WITH_BASE |
851 #undef DECLARE_DESCRIPTOR | 858 #undef DECLARE_DESCRIPTOR |
852 #undef DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE | 859 #undef DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE |
853 #undef DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG | 860 #undef DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG |
854 | 861 |
855 // We define the association between CallDescriptors::Key and the specialized | 862 // We define the association between CallDescriptors::Key and the specialized |
856 // descriptor here to reduce boilerplate and mistakes. | 863 // descriptor here to reduce boilerplate and mistakes. |
857 #define DEF_KEY(name) \ | 864 #define DEF_KEY(name) \ |
858 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } | 865 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } |
859 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) | 866 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) |
860 #undef DEF_KEY | 867 #undef DEF_KEY |
861 } // namespace internal | 868 } // namespace internal |
862 } // namespace v8 | 869 } // namespace v8 |
863 | 870 |
864 | 871 |
865 #if V8_TARGET_ARCH_ARM64 | 872 #if V8_TARGET_ARCH_ARM64 |
866 #include "src/arm64/interface-descriptors-arm64.h" | 873 #include "src/arm64/interface-descriptors-arm64.h" |
867 #elif V8_TARGET_ARCH_ARM | 874 #elif V8_TARGET_ARCH_ARM |
868 #include "src/arm/interface-descriptors-arm.h" | 875 #include "src/arm/interface-descriptors-arm.h" |
869 #endif | 876 #endif |
870 | 877 |
871 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 878 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
OLD | NEW |