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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 V(CreateAllocationSite) \ | 42 V(CreateAllocationSite) \ |
43 V(CreateWeakCell) \ | 43 V(CreateWeakCell) \ |
44 V(CallFunction) \ | 44 V(CallFunction) \ |
45 V(CallIC) \ | 45 V(CallIC) \ |
46 V(CallICTrampoline) \ | 46 V(CallICTrampoline) \ |
47 V(CallForwardVarargs) \ | 47 V(CallForwardVarargs) \ |
48 V(CallConstruct) \ | 48 V(CallConstruct) \ |
49 V(CallTrampoline) \ | 49 V(CallTrampoline) \ |
50 V(ConstructStub) \ | 50 V(ConstructStub) \ |
51 V(ConstructTrampoline) \ | 51 V(ConstructTrampoline) \ |
| 52 V(GenericTagged1) \ |
| 53 V(GenericTagged2) \ |
| 54 V(GenericTagged3) \ |
| 55 V(GenericTagged4) \ |
52 V(RegExpExec) \ | 56 V(RegExpExec) \ |
53 V(RegExpReplace) \ | 57 V(RegExpReplace) \ |
54 V(RegExpSplit) \ | 58 V(RegExpSplit) \ |
55 V(CopyFastSmiOrObjectElements) \ | 59 V(CopyFastSmiOrObjectElements) \ |
56 V(TransitionElementsKind) \ | 60 V(TransitionElementsKind) \ |
57 V(AllocateHeapNumber) \ | 61 V(AllocateHeapNumber) \ |
58 V(Builtin) \ | 62 V(Builtin) \ |
59 V(ArrayConstructor) \ | 63 V(ArrayConstructor) \ |
60 V(IteratingArrayBuiltin) \ | 64 V(IteratingArrayBuiltin) \ |
61 V(IteratingArrayBuiltinLoopContinuation) \ | 65 V(IteratingArrayBuiltinLoopContinuation) \ |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 DEFINE_PARAMETERS(kTarget, kActualArgumentsCount, kSlot) | 642 DEFINE_PARAMETERS(kTarget, kActualArgumentsCount, kSlot) |
639 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(CallICTrampolineDescriptor, | 643 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(CallICTrampolineDescriptor, |
640 CallInterfaceDescriptor) | 644 CallInterfaceDescriptor) |
641 }; | 645 }; |
642 | 646 |
643 class CallConstructDescriptor : public CallInterfaceDescriptor { | 647 class CallConstructDescriptor : public CallInterfaceDescriptor { |
644 public: | 648 public: |
645 DECLARE_DESCRIPTOR(CallConstructDescriptor, CallInterfaceDescriptor) | 649 DECLARE_DESCRIPTOR(CallConstructDescriptor, CallInterfaceDescriptor) |
646 }; | 650 }; |
647 | 651 |
| 652 class GenericTagged1Descriptor : public CallInterfaceDescriptor { |
| 653 public: |
| 654 DEFINE_PARAMETERS(kFirst) |
| 655 DECLARE_DEFAULT_DESCRIPTOR(GenericTagged1Descriptor, CallInterfaceDescriptor, |
| 656 kParameterCount) |
| 657 }; |
| 658 |
| 659 class GenericTagged2Descriptor : public CallInterfaceDescriptor { |
| 660 public: |
| 661 DEFINE_PARAMETERS(kFirst, kSecond) |
| 662 DECLARE_DEFAULT_DESCRIPTOR(GenericTagged2Descriptor, CallInterfaceDescriptor, |
| 663 kParameterCount) |
| 664 }; |
| 665 |
| 666 class GenericTagged3Descriptor : public CallInterfaceDescriptor { |
| 667 public: |
| 668 DEFINE_PARAMETERS(kFirst, kSecond, kThird) |
| 669 DECLARE_DEFAULT_DESCRIPTOR(GenericTagged3Descriptor, CallInterfaceDescriptor, |
| 670 kParameterCount) |
| 671 }; |
| 672 |
| 673 class GenericTagged4Descriptor : public CallInterfaceDescriptor { |
| 674 public: |
| 675 DEFINE_PARAMETERS(kFirst, kSecond, kThird, kFourth) |
| 676 DECLARE_DEFAULT_DESCRIPTOR(GenericTagged4Descriptor, CallInterfaceDescriptor, |
| 677 kParameterCount) |
| 678 }; |
| 679 |
648 class RegExpExecDescriptor : public CallInterfaceDescriptor { | 680 class RegExpExecDescriptor : public CallInterfaceDescriptor { |
649 public: | 681 public: |
650 DEFINE_PARAMETERS(kString, kLastIndex, kStringStart, kStringEnd, kCode) | 682 DEFINE_PARAMETERS(kString, kLastIndex, kStringStart, kStringEnd, kCode) |
651 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(RegExpExecDescriptor, | 683 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(RegExpExecDescriptor, |
652 CallInterfaceDescriptor) | 684 CallInterfaceDescriptor) |
653 | 685 |
654 static const Register StringRegister(); | 686 static const Register StringRegister(); |
655 static const Register LastIndexRegister(); | 687 static const Register LastIndexRegister(); |
656 static const Register StringStartRegister(); | 688 static const Register StringStartRegister(); |
657 static const Register StringEndRegister(); | 689 static const Register StringEndRegister(); |
658 static const Register CodeRegister(); | 690 static const Register CodeRegister(); |
659 }; | 691 }; |
660 | 692 |
661 class RegExpReplaceDescriptor : public CallInterfaceDescriptor { | |
662 public: | |
663 DEFINE_PARAMETERS(kReceiver, kString, kReplaceValue) | |
664 DECLARE_DEFAULT_DESCRIPTOR(RegExpReplaceDescriptor, CallInterfaceDescriptor, | |
665 kParameterCount) | |
666 }; | |
667 | |
668 class RegExpSplitDescriptor : public CallInterfaceDescriptor { | |
669 public: | |
670 DEFINE_PARAMETERS(kReceiver, kString, kLimit) | |
671 DECLARE_DEFAULT_DESCRIPTOR(RegExpSplitDescriptor, CallInterfaceDescriptor, | |
672 kParameterCount) | |
673 }; | |
674 | |
675 class CopyFastSmiOrObjectElementsDescriptor : public CallInterfaceDescriptor { | 693 class CopyFastSmiOrObjectElementsDescriptor : public CallInterfaceDescriptor { |
676 public: | 694 public: |
677 DEFINE_PARAMETERS(kObject) | 695 DEFINE_PARAMETERS(kObject) |
678 DECLARE_DEFAULT_DESCRIPTOR(CopyFastSmiOrObjectElementsDescriptor, | 696 DECLARE_DEFAULT_DESCRIPTOR(CopyFastSmiOrObjectElementsDescriptor, |
679 CallInterfaceDescriptor, kParameterCount) | 697 CallInterfaceDescriptor, kParameterCount) |
680 }; | 698 }; |
681 | 699 |
682 class TransitionElementsKindDescriptor : public CallInterfaceDescriptor { | 700 class TransitionElementsKindDescriptor : public CallInterfaceDescriptor { |
683 public: | 701 public: |
684 DEFINE_PARAMETERS(kObject, kMap) | 702 DEFINE_PARAMETERS(kObject, kMap) |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 class ResumeGeneratorDescriptor final : public CallInterfaceDescriptor { | 971 class ResumeGeneratorDescriptor final : public CallInterfaceDescriptor { |
954 public: | 972 public: |
955 DECLARE_DESCRIPTOR(ResumeGeneratorDescriptor, CallInterfaceDescriptor) | 973 DECLARE_DESCRIPTOR(ResumeGeneratorDescriptor, CallInterfaceDescriptor) |
956 }; | 974 }; |
957 | 975 |
958 class FrameDropperTrampolineDescriptor final : public CallInterfaceDescriptor { | 976 class FrameDropperTrampolineDescriptor final : public CallInterfaceDescriptor { |
959 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(FrameDropperTrampolineDescriptor, | 977 DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(FrameDropperTrampolineDescriptor, |
960 CallInterfaceDescriptor) | 978 CallInterfaceDescriptor) |
961 }; | 979 }; |
962 | 980 |
963 class PromiseHandleRejectDescriptor final : public CallInterfaceDescriptor { | |
964 public: | |
965 DEFINE_PARAMETERS(kPromise, kOnReject, kException) | |
966 DECLARE_DEFAULT_DESCRIPTOR(PromiseHandleRejectDescriptor, | |
967 CallInterfaceDescriptor, kParameterCount) | |
968 }; | |
969 | |
970 class WasmRuntimeCallDescriptor final : public CallInterfaceDescriptor { | 981 class WasmRuntimeCallDescriptor final : public CallInterfaceDescriptor { |
971 public: | 982 public: |
972 DECLARE_DEFAULT_DESCRIPTOR(WasmRuntimeCallDescriptor, CallInterfaceDescriptor, | 983 DECLARE_DEFAULT_DESCRIPTOR(WasmRuntimeCallDescriptor, CallInterfaceDescriptor, |
973 0) | 984 0) |
974 }; | 985 }; |
975 | 986 |
976 #undef DECLARE_DESCRIPTOR_WITH_BASE | 987 #undef DECLARE_DESCRIPTOR_WITH_BASE |
977 #undef DECLARE_DESCRIPTOR | 988 #undef DECLARE_DESCRIPTOR |
978 #undef DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE | 989 #undef DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE |
979 #undef DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG | 990 #undef DECLARE_DESCRIPTOR_WITH_BASE_AND_FUNCTION_TYPE_ARG |
980 #undef DEFINE_PARAMETERS | 991 #undef DEFINE_PARAMETERS |
981 | 992 |
982 // We define the association between CallDescriptors::Key and the specialized | 993 // We define the association between CallDescriptors::Key and the specialized |
983 // descriptor here to reduce boilerplate and mistakes. | 994 // descriptor here to reduce boilerplate and mistakes. |
984 #define DEF_KEY(name) \ | 995 #define DEF_KEY(name) \ |
985 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } | 996 CallDescriptors::Key name##Descriptor::key() { return CallDescriptors::name; } |
986 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) | 997 INTERFACE_DESCRIPTOR_LIST(DEF_KEY) |
987 #undef DEF_KEY | 998 #undef DEF_KEY |
988 } // namespace internal | 999 } // namespace internal |
989 } // namespace v8 | 1000 } // namespace v8 |
990 | 1001 |
991 | 1002 |
992 #if V8_TARGET_ARCH_ARM64 | 1003 #if V8_TARGET_ARCH_ARM64 |
993 #include "src/arm64/interface-descriptors-arm64.h" | 1004 #include "src/arm64/interface-descriptors-arm64.h" |
994 #elif V8_TARGET_ARCH_ARM | 1005 #elif V8_TARGET_ARCH_ARM |
995 #include "src/arm/interface-descriptors-arm.h" | 1006 #include "src/arm/interface-descriptors-arm.h" |
996 #endif | 1007 #endif |
997 | 1008 |
998 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 1009 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
OLD | NEW |