| 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" |
| 11 #include "src/globals.h" | 11 #include "src/globals.h" |
| 12 #include "src/macro-assembler.h" | 12 #include "src/macro-assembler.h" |
| 13 | 13 |
| 14 namespace v8 { | 14 namespace v8 { |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 class PlatformInterfaceDescriptor; | 17 class PlatformInterfaceDescriptor; |
| 18 | 18 |
| 19 #define INTERFACE_DESCRIPTOR_LIST(V) \ | 19 #define INTERFACE_DESCRIPTOR_LIST(V) \ |
| 20 V(Void) \ | 20 V(AllocateBool16x8) \ |
| 21 V(AllocateBool32x4) \ |
| 22 V(AllocateBool8x16) \ |
| 23 V(AllocateFloat32x4) \ |
| 24 V(AllocateHeapNumber) \ |
| 25 V(AllocateInt16x8) \ |
| 26 V(AllocateInt32x4) \ |
| 27 V(AllocateInt8x16) \ |
| 28 V(AllocateUint16x8) \ |
| 29 V(AllocateUint32x4) \ |
| 30 V(AllocateUint8x16) \ |
| 31 V(ApiCallback) \ |
| 32 V(ApiGetter) \ |
| 33 V(ArgumentAdaptor) \ |
| 34 V(ArrayNArgumentsConstructor) \ |
| 35 V(ArrayNoArgumentConstructor) \ |
| 36 V(ArraySingleArgumentConstructor) \ |
| 37 V(BinaryOp) \ |
| 38 V(BinaryOpWithAllocationSite) \ |
| 39 V(BinaryOpWithVector) \ |
| 40 V(Builtin) \ |
| 41 V(CallConstruct) \ |
| 42 V(CallFunction) \ |
| 43 V(CallFunctionWithFeedback) \ |
| 44 V(CallFunctionWithFeedbackAndVector) \ |
| 45 V(CallHandler) \ |
| 46 V(CallTrampoline) \ |
| 47 V(Compare) \ |
| 48 V(ConstructStub) \ |
| 49 V(ConstructTrampoline) \ |
| 21 V(ContextOnly) \ | 50 V(ContextOnly) \ |
| 22 V(Load) \ | 51 V(CopyFastSmiOrObjectElements) \ |
| 23 V(LoadWithVector) \ | 52 V(CountOp) \ |
| 24 V(LoadField) \ | 53 V(CreateAllocationSite) \ |
| 25 V(LoadICProtoArray) \ | 54 V(CreateIterResultObject) \ |
| 26 V(LoadGlobal) \ | 55 V(CreateWeakCell) \ |
| 27 V(LoadGlobalWithVector) \ | 56 V(FastCloneRegExp) \ |
| 28 V(Store) \ | 57 V(FastCloneShallowArray) \ |
| 29 V(StoreWithVector) \ | 58 V(FastCloneShallowObject) \ |
| 30 V(StoreNamedTransition) \ | |
| 31 V(StoreTransition) \ | |
| 32 V(VarArgFunction) \ | |
| 33 V(FastNewClosure) \ | 59 V(FastNewClosure) \ |
| 34 V(FastNewFunctionContext) \ | 60 V(FastNewFunctionContext) \ |
| 35 V(FastNewObject) \ | 61 V(FastNewObject) \ |
| 36 V(FastNewRestParameter) \ | 62 V(FastNewRestParameter) \ |
| 37 V(FastNewSloppyArguments) \ | 63 V(FastNewSloppyArguments) \ |
| 38 V(FastNewStrictArguments) \ | 64 V(FastNewStrictArguments) \ |
| 39 V(TypeConversion) \ | 65 V(ForInFilter) \ |
| 40 V(Typeof) \ | 66 V(GetProperty) \ |
| 41 V(FastCloneRegExp) \ | 67 V(GrowArrayElements) \ |
| 42 V(FastCloneShallowArray) \ | 68 V(HasProperty) \ |
| 43 V(FastCloneShallowObject) \ | 69 V(InterpreterCEntry) \ |
| 44 V(CreateAllocationSite) \ | 70 V(InterpreterDispatch) \ |
| 45 V(CreateWeakCell) \ | 71 V(InterpreterPushArgsAndCall) \ |
| 46 V(CallFunction) \ | 72 V(InterpreterPushArgsAndConstruct) \ |
| 47 V(CallFunctionWithFeedback) \ | 73 V(InterpreterPushArgsAndConstructArray) \ |
| 48 V(CallFunctionWithFeedbackAndVector) \ | 74 V(Keyed) \ |
| 49 V(CallConstruct) \ | 75 V(Load) \ |
| 50 V(CallTrampoline) \ | 76 V(LoadField) \ |
| 51 V(ConstructStub) \ | 77 V(LoadGlobal) \ |
| 52 V(ConstructTrampoline) \ | 78 V(LoadGlobalWithVector) \ |
| 79 V(LoadICProtoArray) \ |
| 80 V(LoadWithVector) \ |
| 81 V(MathPowInteger) \ |
| 82 V(MathPowTagged) \ |
| 83 V(Named) \ |
| 84 V(NewArgumentsElements) \ |
| 85 V(PromiseHandleReject) \ |
| 53 V(RegExpExec) \ | 86 V(RegExpExec) \ |
| 54 V(CopyFastSmiOrObjectElements) \ | 87 V(ResumeGenerator) \ |
| 55 V(TransitionElementsKind) \ | 88 V(Store) \ |
| 56 V(AllocateHeapNumber) \ | 89 V(StoreNamedTransition) \ |
| 57 V(AllocateFloat32x4) \ | 90 V(StoreTransition) \ |
| 58 V(AllocateInt32x4) \ | 91 V(StoreWithVector) \ |
| 59 V(AllocateUint32x4) \ | |
| 60 V(AllocateBool32x4) \ | |
| 61 V(AllocateInt16x8) \ | |
| 62 V(AllocateUint16x8) \ | |
| 63 V(AllocateBool16x8) \ | |
| 64 V(AllocateInt8x16) \ | |
| 65 V(AllocateUint8x16) \ | |
| 66 V(AllocateBool8x16) \ | |
| 67 V(Builtin) \ | |
| 68 V(ArrayNoArgumentConstructor) \ | |
| 69 V(ArraySingleArgumentConstructor) \ | |
| 70 V(ArrayNArgumentsConstructor) \ | |
| 71 V(Compare) \ | |
| 72 V(BinaryOp) \ | |
| 73 V(BinaryOpWithAllocationSite) \ | |
| 74 V(BinaryOpWithVector) \ | |
| 75 V(CountOp) \ | |
| 76 V(StringAdd) \ | 92 V(StringAdd) \ |
| 77 V(StringCharAt) \ | 93 V(StringCharAt) \ |
| 78 V(StringCharCodeAt) \ | 94 V(StringCharCodeAt) \ |
| 79 V(StringCompare) \ | 95 V(StringCompare) \ |
| 96 V(StringIndexOf) \ |
| 80 V(SubString) \ | 97 V(SubString) \ |
| 81 V(Keyed) \ | 98 V(TransitionElementsKind) \ |
| 82 V(Named) \ | 99 V(TypeConversion) \ |
| 83 V(CreateIterResultObject) \ | 100 V(Typeof) \ |
| 84 V(HasProperty) \ | 101 V(VarArgFunction) \ |
| 85 V(ForInFilter) \ | 102 V(Void) |
| 86 V(GetProperty) \ | |
| 87 V(CallHandler) \ | |
| 88 V(ArgumentAdaptor) \ | |
| 89 V(ApiCallback) \ | |
| 90 V(ApiGetter) \ | |
| 91 V(MathPowTagged) \ | |
| 92 V(MathPowInteger) \ | |
| 93 V(GrowArrayElements) \ | |
| 94 V(NewArgumentsElements) \ | |
| 95 V(InterpreterDispatch) \ | |
| 96 V(InterpreterPushArgsAndCall) \ | |
| 97 V(InterpreterPushArgsAndConstruct) \ | |
| 98 V(InterpreterPushArgsAndConstructArray) \ | |
| 99 V(InterpreterCEntry) \ | |
| 100 V(ResumeGenerator) \ | |
| 101 V(PromiseHandleReject) | |
| 102 | 103 |
| 103 class V8_EXPORT_PRIVATE CallInterfaceDescriptorData { | 104 class V8_EXPORT_PRIVATE CallInterfaceDescriptorData { |
| 104 public: | 105 public: |
| 105 CallInterfaceDescriptorData() : register_param_count_(-1), param_count_(-1) {} | 106 CallInterfaceDescriptorData() : register_param_count_(-1), param_count_(-1) {} |
| 106 | 107 |
| 107 // A copy of the passed in registers and param_representations is made | 108 // A copy of the passed in registers and param_representations is made |
| 108 // and owned by the CallInterfaceDescriptorData. | 109 // and owned by the CallInterfaceDescriptorData. |
| 109 | 110 |
| 110 void InitializePlatformSpecific( | 111 void InitializePlatformSpecific( |
| 111 int register_parameter_count, const Register* registers, | 112 int register_parameter_count, const Register* registers, |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 | 732 |
| 732 class StringCompareDescriptor : public CallInterfaceDescriptor { | 733 class StringCompareDescriptor : public CallInterfaceDescriptor { |
| 733 public: | 734 public: |
| 734 DEFINE_PARAMETERS(kLeft, kRight) | 735 DEFINE_PARAMETERS(kLeft, kRight) |
| 735 DECLARE_DESCRIPTOR(StringCompareDescriptor, CallInterfaceDescriptor) | 736 DECLARE_DESCRIPTOR(StringCompareDescriptor, CallInterfaceDescriptor) |
| 736 | 737 |
| 737 static const Register LeftRegister(); | 738 static const Register LeftRegister(); |
| 738 static const Register RightRegister(); | 739 static const Register RightRegister(); |
| 739 }; | 740 }; |
| 740 | 741 |
| 742 class StringIndexOfDescriptor final : public CallInterfaceDescriptor { |
| 743 public: |
| 744 DEFINE_PARAMETERS(kReceiver, kSearchString, kPosition) |
| 745 DECLARE_DEFAULT_DESCRIPTOR(StringIndexOfDescriptor, CallInterfaceDescriptor, |
| 746 kParameterCount) |
| 747 }; |
| 748 |
| 741 class SubStringDescriptor : public CallInterfaceDescriptor { | 749 class SubStringDescriptor : public CallInterfaceDescriptor { |
| 742 public: | 750 public: |
| 743 DEFINE_PARAMETERS(kString, kFrom, kTo) | 751 DEFINE_PARAMETERS(kString, kFrom, kTo) |
| 744 DECLARE_DESCRIPTOR_WITH_STACK_ARGS(SubStringDescriptor, | 752 DECLARE_DESCRIPTOR_WITH_STACK_ARGS(SubStringDescriptor, |
| 745 CallInterfaceDescriptor) | 753 CallInterfaceDescriptor) |
| 746 }; | 754 }; |
| 747 | 755 |
| 748 // TODO(ishell): not used, remove. | 756 // TODO(ishell): not used, remove. |
| 749 class KeyedDescriptor : public CallInterfaceDescriptor { | 757 class KeyedDescriptor : public CallInterfaceDescriptor { |
| 750 public: | 758 public: |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 } // namespace v8 | 907 } // namespace v8 |
| 900 | 908 |
| 901 | 909 |
| 902 #if V8_TARGET_ARCH_ARM64 | 910 #if V8_TARGET_ARCH_ARM64 |
| 903 #include "src/arm64/interface-descriptors-arm64.h" | 911 #include "src/arm64/interface-descriptors-arm64.h" |
| 904 #elif V8_TARGET_ARCH_ARM | 912 #elif V8_TARGET_ARCH_ARM |
| 905 #include "src/arm/interface-descriptors-arm.h" | 913 #include "src/arm/interface-descriptors-arm.h" |
| 906 #endif | 914 #endif |
| 907 | 915 |
| 908 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 916 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
| OLD | NEW |