| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 class CallDescriptors { | 150 class CallDescriptors { |
| 151 public: | 151 public: |
| 152 enum Key { | 152 enum Key { |
| 153 #define DEF_ENUM(name) name, | 153 #define DEF_ENUM(name) name, |
| 154 INTERFACE_DESCRIPTOR_LIST(DEF_ENUM) | 154 INTERFACE_DESCRIPTOR_LIST(DEF_ENUM) |
| 155 #undef DEF_ENUM | 155 #undef DEF_ENUM |
| 156 NUMBER_OF_DESCRIPTORS | 156 NUMBER_OF_DESCRIPTORS |
| 157 }; | 157 }; |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 class V8_EXPORT_PRIVATE CallInterfaceDescriptor { | 160 |
| 161 class CallInterfaceDescriptor { |
| 161 public: | 162 public: |
| 162 CallInterfaceDescriptor() : data_(NULL) {} | 163 CallInterfaceDescriptor() : data_(NULL) {} |
| 163 virtual ~CallInterfaceDescriptor() {} | 164 virtual ~CallInterfaceDescriptor() {} |
| 164 | 165 |
| 165 CallInterfaceDescriptor(Isolate* isolate, CallDescriptors::Key key) | 166 CallInterfaceDescriptor(Isolate* isolate, CallDescriptors::Key key) |
| 166 : data_(isolate->call_descriptor_data(key)) {} | 167 : data_(isolate->call_descriptor_data(key)) {} |
| 167 | 168 |
| 168 int GetParameterCount() const { return data()->param_count(); } | 169 int GetParameterCount() const { return data()->param_count(); } |
| 169 | 170 |
| 170 int GetRegisterParameterCount() const { | 171 int GetRegisterParameterCount() const { |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 // TODO(turbofan): We should probably rename this to GrowFastElementsDescriptor. | 768 // TODO(turbofan): We should probably rename this to GrowFastElementsDescriptor. |
| 768 class GrowArrayElementsDescriptor : public CallInterfaceDescriptor { | 769 class GrowArrayElementsDescriptor : public CallInterfaceDescriptor { |
| 769 public: | 770 public: |
| 770 DEFINE_PARAMETERS(kObject, kKey) | 771 DEFINE_PARAMETERS(kObject, kKey) |
| 771 DECLARE_DESCRIPTOR(GrowArrayElementsDescriptor, CallInterfaceDescriptor) | 772 DECLARE_DESCRIPTOR(GrowArrayElementsDescriptor, CallInterfaceDescriptor) |
| 772 | 773 |
| 773 static const Register ObjectRegister(); | 774 static const Register ObjectRegister(); |
| 774 static const Register KeyRegister(); | 775 static const Register KeyRegister(); |
| 775 }; | 776 }; |
| 776 | 777 |
| 777 class V8_EXPORT_PRIVATE InterpreterDispatchDescriptor | 778 class InterpreterDispatchDescriptor : public CallInterfaceDescriptor { |
| 778 : public CallInterfaceDescriptor { | |
| 779 public: | 779 public: |
| 780 DEFINE_PARAMETERS(kAccumulator, kBytecodeOffset, kBytecodeArray, | 780 DEFINE_PARAMETERS(kAccumulator, kBytecodeOffset, kBytecodeArray, |
| 781 kDispatchTable) | 781 kDispatchTable) |
| 782 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(InterpreterDispatchDescriptor, | 782 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(InterpreterDispatchDescriptor, |
| 783 CallInterfaceDescriptor) | 783 CallInterfaceDescriptor) |
| 784 }; | 784 }; |
| 785 | 785 |
| 786 class InterpreterPushArgsAndCallDescriptor : public CallInterfaceDescriptor { | 786 class InterpreterPushArgsAndCallDescriptor : public CallInterfaceDescriptor { |
| 787 public: | 787 public: |
| 788 DEFINE_PARAMETERS(kNumberOfArguments, kFirstArgument, kFunction) | 788 DEFINE_PARAMETERS(kNumberOfArguments, kFirstArgument, kFunction) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 } // namespace v8 | 837 } // namespace v8 |
| 838 | 838 |
| 839 | 839 |
| 840 #if V8_TARGET_ARCH_ARM64 | 840 #if V8_TARGET_ARCH_ARM64 |
| 841 #include "src/arm64/interface-descriptors-arm64.h" | 841 #include "src/arm64/interface-descriptors-arm64.h" |
| 842 #elif V8_TARGET_ARCH_ARM | 842 #elif V8_TARGET_ARCH_ARM |
| 843 #include "src/arm/interface-descriptors-arm.h" | 843 #include "src/arm/interface-descriptors-arm.h" |
| 844 #endif | 844 #endif |
| 845 | 845 |
| 846 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 846 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
| OLD | NEW |