OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/code-stub-assembler.h" | 10 #include "src/code-stub-assembler.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 V(AllocateBool16x8) \ | 101 V(AllocateBool16x8) \ |
102 V(AllocateInt8x16) \ | 102 V(AllocateInt8x16) \ |
103 V(AllocateUint8x16) \ | 103 V(AllocateUint8x16) \ |
104 V(AllocateBool8x16) \ | 104 V(AllocateBool8x16) \ |
105 V(ArrayNoArgumentConstructor) \ | 105 V(ArrayNoArgumentConstructor) \ |
106 V(ArraySingleArgumentConstructor) \ | 106 V(ArraySingleArgumentConstructor) \ |
107 V(ArrayNArgumentsConstructor) \ | 107 V(ArrayNArgumentsConstructor) \ |
108 V(CreateAllocationSite) \ | 108 V(CreateAllocationSite) \ |
109 V(CreateWeakCell) \ | 109 V(CreateWeakCell) \ |
110 V(StringLength) \ | 110 V(StringLength) \ |
111 V(Add) \ | |
112 V(AddWithFeedback) \ | 111 V(AddWithFeedback) \ |
113 V(Subtract) \ | |
114 V(SubtractWithFeedback) \ | 112 V(SubtractWithFeedback) \ |
115 V(Multiply) \ | |
116 V(MultiplyWithFeedback) \ | 113 V(MultiplyWithFeedback) \ |
117 V(Divide) \ | |
118 V(DivideWithFeedback) \ | 114 V(DivideWithFeedback) \ |
119 V(Modulus) \ | |
120 V(ModulusWithFeedback) \ | 115 V(ModulusWithFeedback) \ |
121 V(ShiftRight) \ | |
122 V(ShiftRightLogical) \ | |
123 V(ShiftLeft) \ | |
124 V(BitwiseAnd) \ | |
125 V(BitwiseOr) \ | |
126 V(BitwiseXor) \ | |
127 V(Inc) \ | 116 V(Inc) \ |
128 V(InternalArrayNoArgumentConstructor) \ | 117 V(InternalArrayNoArgumentConstructor) \ |
129 V(InternalArraySingleArgumentConstructor) \ | 118 V(InternalArraySingleArgumentConstructor) \ |
130 V(Dec) \ | 119 V(Dec) \ |
131 V(ElementsTransitionAndStore) \ | 120 V(ElementsTransitionAndStore) \ |
132 V(FastCloneRegExp) \ | 121 V(FastCloneRegExp) \ |
133 V(FastCloneShallowArray) \ | 122 V(FastCloneShallowArray) \ |
134 V(FastCloneShallowObject) \ | 123 V(FastCloneShallowObject) \ |
135 V(FastNewClosure) \ | 124 V(FastNewClosure) \ |
136 V(FastNewFunctionContext) \ | 125 V(FastNewFunctionContext) \ |
137 V(InstanceOf) \ | |
138 V(LessThan) \ | |
139 V(LessThanOrEqual) \ | |
140 V(GreaterThan) \ | |
141 V(GreaterThanOrEqual) \ | |
142 V(Equal) \ | |
143 V(NotEqual) \ | |
144 V(KeyedLoadSloppyArguments) \ | 126 V(KeyedLoadSloppyArguments) \ |
145 V(KeyedStoreSloppyArguments) \ | 127 V(KeyedStoreSloppyArguments) \ |
146 V(LoadScriptContextField) \ | 128 V(LoadScriptContextField) \ |
147 V(StoreScriptContextField) \ | 129 V(StoreScriptContextField) \ |
148 V(StrictEqual) \ | |
149 V(StrictNotEqual) \ | |
150 V(ToInteger) \ | |
151 V(ToLength) \ | |
152 V(HasProperty) \ | |
153 V(ForInFilter) \ | |
154 V(GetProperty) \ | 130 V(GetProperty) \ |
155 V(LoadICTF) \ | 131 V(LoadICTF) \ |
156 V(KeyedLoadICTF) \ | 132 V(KeyedLoadICTF) \ |
157 V(StoreFastElement) \ | 133 V(StoreFastElement) \ |
158 V(StoreField) \ | 134 V(StoreField) \ |
159 V(StoreGlobal) \ | 135 V(StoreGlobal) \ |
160 V(StoreICTF) \ | 136 V(StoreICTF) \ |
161 V(StoreInterceptor) \ | 137 V(StoreInterceptor) \ |
162 V(StoreMap) \ | 138 V(StoreMap) \ |
163 V(StoreTransition) \ | 139 V(StoreTransition) \ |
164 V(LoadApiGetter) \ | 140 V(LoadApiGetter) \ |
165 V(LoadIndexedInterceptor) \ | 141 V(LoadIndexedInterceptor) \ |
166 V(GrowArrayElements) \ | 142 V(GrowArrayElements) \ |
167 V(ToObject) \ | |
168 V(Typeof) \ | |
169 /* These are only called from FGC and */ \ | 143 /* These are only called from FGC and */ \ |
170 /* can be removed when we use ignition */ \ | 144 /* can be removed when we use ignition */ \ |
171 /* only */ \ | 145 /* only */ \ |
172 V(LoadICTrampolineTF) \ | 146 V(LoadICTrampolineTF) \ |
173 V(LoadGlobalICTrampoline) \ | 147 V(LoadGlobalICTrampoline) \ |
174 V(KeyedLoadICTrampolineTF) \ | 148 V(KeyedLoadICTrampolineTF) \ |
175 V(StoreICTrampolineTF) | 149 V(StoreICTrampolineTF) |
176 | 150 |
177 // List of code stubs only used on ARM 32 bits platforms. | 151 // List of code stubs only used on ARM 32 bits platforms. |
178 #if V8_TARGET_ARCH_ARM | 152 #if V8_TARGET_ARCH_ARM |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 public: | 723 public: |
750 explicit StringLengthStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 724 explicit StringLengthStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
751 | 725 |
752 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 726 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
753 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } | 727 ExtraICState GetExtraICState() const override { return Code::LOAD_IC; } |
754 | 728 |
755 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 729 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
756 DEFINE_TURBOFAN_CODE_STUB(StringLength, TurboFanCodeStub); | 730 DEFINE_TURBOFAN_CODE_STUB(StringLength, TurboFanCodeStub); |
757 }; | 731 }; |
758 | 732 |
759 class AddStub final : public TurboFanCodeStub { | |
760 public: | |
761 explicit AddStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
762 | |
763 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
764 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Add, TurboFanCodeStub); | |
765 }; | |
766 | |
767 class AddWithFeedbackStub final : public TurboFanCodeStub { | 733 class AddWithFeedbackStub final : public TurboFanCodeStub { |
768 public: | 734 public: |
769 explicit AddWithFeedbackStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 735 explicit AddWithFeedbackStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
770 | 736 |
771 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); | 737 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); |
772 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(AddWithFeedback, | 738 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(AddWithFeedback, |
773 TurboFanCodeStub); | 739 TurboFanCodeStub); |
774 }; | 740 }; |
775 | 741 |
776 class SubtractStub final : public TurboFanCodeStub { | |
777 public: | |
778 explicit SubtractStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
779 | |
780 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
781 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Subtract, TurboFanCodeStub); | |
782 }; | |
783 | |
784 class SubtractWithFeedbackStub final : public TurboFanCodeStub { | 742 class SubtractWithFeedbackStub final : public TurboFanCodeStub { |
785 public: | 743 public: |
786 explicit SubtractWithFeedbackStub(Isolate* isolate) | 744 explicit SubtractWithFeedbackStub(Isolate* isolate) |
787 : TurboFanCodeStub(isolate) {} | 745 : TurboFanCodeStub(isolate) {} |
788 | 746 |
789 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); | 747 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); |
790 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(SubtractWithFeedback, | 748 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(SubtractWithFeedback, |
791 TurboFanCodeStub); | 749 TurboFanCodeStub); |
792 }; | 750 }; |
793 | 751 |
794 class MultiplyStub final : public TurboFanCodeStub { | |
795 public: | |
796 explicit MultiplyStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
797 | |
798 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
799 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Multiply, TurboFanCodeStub); | |
800 }; | |
801 | |
802 class MultiplyWithFeedbackStub final : public TurboFanCodeStub { | 752 class MultiplyWithFeedbackStub final : public TurboFanCodeStub { |
803 public: | 753 public: |
804 explicit MultiplyWithFeedbackStub(Isolate* isolate) | 754 explicit MultiplyWithFeedbackStub(Isolate* isolate) |
805 : TurboFanCodeStub(isolate) {} | 755 : TurboFanCodeStub(isolate) {} |
806 | 756 |
807 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); | 757 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); |
808 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(MultiplyWithFeedback, | 758 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(MultiplyWithFeedback, |
809 TurboFanCodeStub); | 759 TurboFanCodeStub); |
810 }; | 760 }; |
811 | 761 |
812 class DivideStub final : public TurboFanCodeStub { | |
813 public: | |
814 explicit DivideStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
815 | |
816 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
817 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Divide, TurboFanCodeStub); | |
818 }; | |
819 | |
820 class DivideWithFeedbackStub final : public TurboFanCodeStub { | 762 class DivideWithFeedbackStub final : public TurboFanCodeStub { |
821 public: | 763 public: |
822 explicit DivideWithFeedbackStub(Isolate* isolate) | 764 explicit DivideWithFeedbackStub(Isolate* isolate) |
823 : TurboFanCodeStub(isolate) {} | 765 : TurboFanCodeStub(isolate) {} |
824 | 766 |
825 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); | 767 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); |
826 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(DivideWithFeedback, | 768 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(DivideWithFeedback, |
827 TurboFanCodeStub); | 769 TurboFanCodeStub); |
828 }; | 770 }; |
829 | 771 |
830 class ModulusStub final : public TurboFanCodeStub { | |
831 public: | |
832 explicit ModulusStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
833 | |
834 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
835 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Modulus, TurboFanCodeStub); | |
836 }; | |
837 | |
838 class ModulusWithFeedbackStub final : public TurboFanCodeStub { | 772 class ModulusWithFeedbackStub final : public TurboFanCodeStub { |
839 public: | 773 public: |
840 explicit ModulusWithFeedbackStub(Isolate* isolate) | 774 explicit ModulusWithFeedbackStub(Isolate* isolate) |
841 : TurboFanCodeStub(isolate) {} | 775 : TurboFanCodeStub(isolate) {} |
842 | 776 |
843 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); | 777 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOpWithVector); |
844 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(ModulusWithFeedback, | 778 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB_WITH_FEEDBACK(ModulusWithFeedback, |
845 TurboFanCodeStub); | 779 TurboFanCodeStub); |
846 }; | 780 }; |
847 | 781 |
848 class ShiftRightStub final : public TurboFanCodeStub { | |
849 public: | |
850 explicit ShiftRightStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
851 | |
852 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
853 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(ShiftRight, TurboFanCodeStub); | |
854 }; | |
855 | |
856 class ShiftRightLogicalStub final : public TurboFanCodeStub { | |
857 public: | |
858 explicit ShiftRightLogicalStub(Isolate* isolate) | |
859 : TurboFanCodeStub(isolate) {} | |
860 | |
861 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
862 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(ShiftRightLogical, TurboFanCodeStub); | |
863 }; | |
864 | |
865 class ShiftLeftStub final : public TurboFanCodeStub { | |
866 public: | |
867 explicit ShiftLeftStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
868 | |
869 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
870 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(ShiftLeft, TurboFanCodeStub); | |
871 }; | |
872 | |
873 class BitwiseAndStub final : public TurboFanCodeStub { | |
874 public: | |
875 explicit BitwiseAndStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
876 | |
877 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
878 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(BitwiseAnd, TurboFanCodeStub); | |
879 }; | |
880 | |
881 class BitwiseOrStub final : public TurboFanCodeStub { | |
882 public: | |
883 explicit BitwiseOrStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
884 | |
885 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
886 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(BitwiseOr, TurboFanCodeStub); | |
887 }; | |
888 | |
889 class BitwiseXorStub final : public TurboFanCodeStub { | |
890 public: | |
891 explicit BitwiseXorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
892 | |
893 DEFINE_CALL_INTERFACE_DESCRIPTOR(BinaryOp); | |
894 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(BitwiseXor, TurboFanCodeStub); | |
895 }; | |
896 | |
897 class IncStub final : public TurboFanCodeStub { | 782 class IncStub final : public TurboFanCodeStub { |
898 public: | 783 public: |
899 explicit IncStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 784 explicit IncStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
900 | 785 |
901 DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp); | 786 DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp); |
902 DEFINE_TURBOFAN_UNARY_OP_CODE_STUB_WITH_FEEDBACK(Inc, TurboFanCodeStub); | 787 DEFINE_TURBOFAN_UNARY_OP_CODE_STUB_WITH_FEEDBACK(Inc, TurboFanCodeStub); |
903 }; | 788 }; |
904 | 789 |
905 class DecStub final : public TurboFanCodeStub { | 790 class DecStub final : public TurboFanCodeStub { |
906 public: | 791 public: |
907 explicit DecStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 792 explicit DecStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
908 | 793 |
909 DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp); | 794 DEFINE_CALL_INTERFACE_DESCRIPTOR(CountOp); |
910 DEFINE_TURBOFAN_UNARY_OP_CODE_STUB_WITH_FEEDBACK(Dec, TurboFanCodeStub); | 795 DEFINE_TURBOFAN_UNARY_OP_CODE_STUB_WITH_FEEDBACK(Dec, TurboFanCodeStub); |
911 }; | 796 }; |
912 | 797 |
913 class InstanceOfStub final : public TurboFanCodeStub { | |
914 public: | |
915 explicit InstanceOfStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
916 | |
917 private: | |
918 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); | |
919 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(InstanceOf, TurboFanCodeStub); | |
920 }; | |
921 | |
922 class LessThanStub final : public TurboFanCodeStub { | |
923 public: | |
924 explicit LessThanStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
925 | |
926 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); | |
927 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(LessThan, TurboFanCodeStub); | |
928 }; | |
929 | |
930 class LessThanOrEqualStub final : public TurboFanCodeStub { | |
931 public: | |
932 explicit LessThanOrEqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
933 | |
934 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); | |
935 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(LessThanOrEqual, TurboFanCodeStub); | |
936 }; | |
937 | |
938 class GreaterThanStub final : public TurboFanCodeStub { | |
939 public: | |
940 explicit GreaterThanStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
941 | |
942 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); | |
943 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(GreaterThan, TurboFanCodeStub); | |
944 }; | |
945 | |
946 class GreaterThanOrEqualStub final : public TurboFanCodeStub { | |
947 public: | |
948 explicit GreaterThanOrEqualStub(Isolate* isolate) | |
949 : TurboFanCodeStub(isolate) {} | |
950 | |
951 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); | |
952 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(GreaterThanOrEqual, TurboFanCodeStub); | |
953 }; | |
954 | |
955 class EqualStub final : public TurboFanCodeStub { | |
956 public: | |
957 explicit EqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
958 | |
959 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); | |
960 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(Equal, TurboFanCodeStub); | |
961 }; | |
962 | |
963 class NotEqualStub final : public TurboFanCodeStub { | |
964 public: | |
965 explicit NotEqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
966 | |
967 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); | |
968 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(NotEqual, TurboFanCodeStub); | |
969 }; | |
970 | |
971 class StrictEqualStub final : public TurboFanCodeStub { | |
972 public: | |
973 explicit StrictEqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
974 | |
975 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); | |
976 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(StrictEqual, TurboFanCodeStub); | |
977 }; | |
978 | |
979 class StrictNotEqualStub final : public TurboFanCodeStub { | |
980 public: | |
981 explicit StrictNotEqualStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
982 | |
983 DEFINE_CALL_INTERFACE_DESCRIPTOR(Compare); | |
984 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(StrictNotEqual, TurboFanCodeStub); | |
985 }; | |
986 | |
987 class ToIntegerStub final : public TurboFanCodeStub { | |
988 public: | |
989 explicit ToIntegerStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
990 | |
991 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); | |
992 DEFINE_TURBOFAN_CODE_STUB(ToInteger, TurboFanCodeStub); | |
993 }; | |
994 | |
995 class ToLengthStub final : public TurboFanCodeStub { | |
996 public: | |
997 explicit ToLengthStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
998 | |
999 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); | |
1000 DEFINE_TURBOFAN_CODE_STUB(ToLength, TurboFanCodeStub); | |
1001 }; | |
1002 | |
1003 class StoreInterceptorStub : public TurboFanCodeStub { | 798 class StoreInterceptorStub : public TurboFanCodeStub { |
1004 public: | 799 public: |
1005 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 800 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
1006 | 801 |
1007 void GenerateAssembly(CodeStubAssembler* assember) const override; | 802 void GenerateAssembly(CodeStubAssembler* assember) const override; |
1008 | 803 |
1009 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 804 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
1010 ExtraICState GetExtraICState() const override { return Code::STORE_IC; } | 805 ExtraICState GetExtraICState() const override { return Code::STORE_IC; } |
1011 | 806 |
1012 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector); | 807 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector); |
1013 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub); | 808 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub); |
1014 }; | 809 }; |
1015 | 810 |
1016 class LoadIndexedInterceptorStub : public TurboFanCodeStub { | 811 class LoadIndexedInterceptorStub : public TurboFanCodeStub { |
1017 public: | 812 public: |
1018 explicit LoadIndexedInterceptorStub(Isolate* isolate) | 813 explicit LoadIndexedInterceptorStub(Isolate* isolate) |
1019 : TurboFanCodeStub(isolate) {} | 814 : TurboFanCodeStub(isolate) {} |
1020 | 815 |
1021 Code::Kind GetCodeKind() const override { return Code::HANDLER; } | 816 Code::Kind GetCodeKind() const override { return Code::HANDLER; } |
1022 ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; } | 817 ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; } |
1023 | 818 |
1024 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); | 819 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); |
1025 DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub); | 820 DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub); |
1026 }; | 821 }; |
1027 | 822 |
1028 // ES6 section 12.10.3 "in" operator evaluation. | |
1029 class HasPropertyStub : public TurboFanCodeStub { | |
1030 public: | |
1031 explicit HasPropertyStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
1032 | |
1033 DEFINE_CALL_INTERFACE_DESCRIPTOR(HasProperty); | |
1034 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(HasProperty, TurboFanCodeStub); | |
1035 }; | |
1036 | |
1037 class ForInFilterStub : public TurboFanCodeStub { | |
1038 public: | |
1039 explicit ForInFilterStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
1040 | |
1041 DEFINE_CALL_INTERFACE_DESCRIPTOR(ForInFilter); | |
1042 DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(ForInFilter, TurboFanCodeStub); | |
1043 }; | |
1044 | |
1045 // ES6 [[Get]] operation. | 823 // ES6 [[Get]] operation. |
1046 class GetPropertyStub : public TurboFanCodeStub { | 824 class GetPropertyStub : public TurboFanCodeStub { |
1047 public: | 825 public: |
1048 explicit GetPropertyStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 826 explicit GetPropertyStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
1049 | 827 |
1050 DEFINE_CALL_INTERFACE_DESCRIPTOR(GetProperty); | 828 DEFINE_CALL_INTERFACE_DESCRIPTOR(GetProperty); |
1051 DEFINE_TURBOFAN_CODE_STUB(GetProperty, TurboFanCodeStub); | 829 DEFINE_TURBOFAN_CODE_STUB(GetProperty, TurboFanCodeStub); |
1052 }; | 830 }; |
1053 | 831 |
1054 enum StringAddFlags { | 832 enum StringAddFlags { |
(...skipping 16 matching lines...) Expand all Loading... |
1071 | 849 |
1072 | 850 |
1073 class NumberToStringStub final : public HydrogenCodeStub { | 851 class NumberToStringStub final : public HydrogenCodeStub { |
1074 public: | 852 public: |
1075 explicit NumberToStringStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} | 853 explicit NumberToStringStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} |
1076 | 854 |
1077 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); | 855 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); |
1078 DEFINE_HYDROGEN_CODE_STUB(NumberToString, HydrogenCodeStub); | 856 DEFINE_HYDROGEN_CODE_STUB(NumberToString, HydrogenCodeStub); |
1079 }; | 857 }; |
1080 | 858 |
1081 class TypeofStub final : public TurboFanCodeStub { | |
1082 public: | |
1083 explicit TypeofStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
1084 | |
1085 DEFINE_CALL_INTERFACE_DESCRIPTOR(Typeof); | |
1086 DEFINE_TURBOFAN_UNARY_OP_CODE_STUB(Typeof, TurboFanCodeStub); | |
1087 }; | |
1088 | |
1089 class FastNewClosureStub : public TurboFanCodeStub { | 859 class FastNewClosureStub : public TurboFanCodeStub { |
1090 public: | 860 public: |
1091 explicit FastNewClosureStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | 861 explicit FastNewClosureStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} |
1092 | 862 |
1093 static compiler::Node* Generate(CodeStubAssembler* assembler, | 863 static compiler::Node* Generate(CodeStubAssembler* assembler, |
1094 compiler::Node* shared_info, | 864 compiler::Node* shared_info, |
1095 compiler::Node* context); | 865 compiler::Node* context); |
1096 | 866 |
1097 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); | 867 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); |
1098 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); | 868 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); |
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3109 assembler->Parameter(Descriptor::kString), | 2879 assembler->Parameter(Descriptor::kString), |
3110 assembler->Parameter(Descriptor::kFrom), | 2880 assembler->Parameter(Descriptor::kFrom), |
3111 assembler->Parameter(Descriptor::kTo), | 2881 assembler->Parameter(Descriptor::kTo), |
3112 assembler->Parameter(Descriptor::kContext))); | 2882 assembler->Parameter(Descriptor::kContext))); |
3113 } | 2883 } |
3114 | 2884 |
3115 DEFINE_CALL_INTERFACE_DESCRIPTOR(SubString); | 2885 DEFINE_CALL_INTERFACE_DESCRIPTOR(SubString); |
3116 DEFINE_CODE_STUB(SubString, TurboFanCodeStub); | 2886 DEFINE_CODE_STUB(SubString, TurboFanCodeStub); |
3117 }; | 2887 }; |
3118 | 2888 |
3119 class ToObjectStub final : public TurboFanCodeStub { | |
3120 public: | |
3121 explicit ToObjectStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} | |
3122 | |
3123 DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion); | |
3124 DEFINE_TURBOFAN_CODE_STUB(ToObject, TurboFanCodeStub); | |
3125 }; | |
3126 | 2889 |
3127 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2890 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
3128 #undef DEFINE_PLATFORM_CODE_STUB | 2891 #undef DEFINE_PLATFORM_CODE_STUB |
3129 #undef DEFINE_HANDLER_CODE_STUB | 2892 #undef DEFINE_HANDLER_CODE_STUB |
3130 #undef DEFINE_HYDROGEN_CODE_STUB | 2893 #undef DEFINE_HYDROGEN_CODE_STUB |
3131 #undef DEFINE_CODE_STUB | 2894 #undef DEFINE_CODE_STUB |
3132 #undef DEFINE_CODE_STUB_BASE | 2895 #undef DEFINE_CODE_STUB_BASE |
3133 | 2896 |
3134 extern Representation RepresentationFromMachineType(MachineType type); | 2897 extern Representation RepresentationFromMachineType(MachineType type); |
3135 | 2898 |
3136 } // namespace internal | 2899 } // namespace internal |
3137 } // namespace v8 | 2900 } // namespace v8 |
3138 | 2901 |
3139 #endif // V8_CODE_STUBS_H_ | 2902 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |