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