OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 V(RevertToNumber) \ | 59 V(RevertToNumber) \ |
60 V(ToBoolean) \ | 60 V(ToBoolean) \ |
61 V(ToNumber) \ | 61 V(ToNumber) \ |
62 V(CounterOp) \ | 62 V(CounterOp) \ |
63 V(ArgumentsAccess) \ | 63 V(ArgumentsAccess) \ |
64 V(RegExpExec) \ | 64 V(RegExpExec) \ |
65 V(RegExpConstructResult) \ | 65 V(RegExpConstructResult) \ |
66 V(NumberToString) \ | 66 V(NumberToString) \ |
67 V(CEntry) \ | 67 V(CEntry) \ |
68 V(JSEntry) \ | 68 V(JSEntry) \ |
| 69 V(KeyedLoadFastElement) \ |
| 70 V(KeyedStoreFastElement) \ |
| 71 V(KeyedLoadExternalArray) \ |
| 72 V(KeyedStoreExternalArray) \ |
69 V(DebuggerStatement) \ | 73 V(DebuggerStatement) \ |
70 V(StringDictionaryNegativeLookup) | 74 V(StringDictionaryNegativeLookup) |
71 | 75 |
72 // List of code stubs only used on ARM platforms. | 76 // List of code stubs only used on ARM platforms. |
73 #ifdef V8_TARGET_ARCH_ARM | 77 #ifdef V8_TARGET_ARCH_ARM |
74 #define CODE_STUB_LIST_ARM(V) \ | 78 #define CODE_STUB_LIST_ARM(V) \ |
75 V(GetProperty) \ | 79 V(GetProperty) \ |
76 V(SetProperty) \ | 80 V(SetProperty) \ |
77 V(InvokeBuiltin) \ | 81 V(InvokeBuiltin) \ |
78 V(RegExpCEntry) \ | 82 V(RegExpCEntry) \ |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 masm_->set_allow_stub_calls(previous_allow_); | 919 masm_->set_allow_stub_calls(previous_allow_); |
916 } | 920 } |
917 | 921 |
918 private: | 922 private: |
919 MacroAssembler* masm_; | 923 MacroAssembler* masm_; |
920 bool previous_allow_; | 924 bool previous_allow_; |
921 | 925 |
922 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); | 926 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); |
923 }; | 927 }; |
924 | 928 |
| 929 #ifdef DEBUG |
| 930 #define DECLARE_ARRAY_STUB_PRINT(name) void Print() { PrintF(#name); } |
| 931 #else |
| 932 #define DECLARE_ARRAY_STUB_PRINT(name) |
| 933 #endif |
| 934 |
| 935 |
| 936 class KeyedLoadFastElementStub : public CodeStub { |
| 937 public: |
| 938 explicit KeyedLoadFastElementStub() { |
| 939 } |
| 940 |
| 941 Major MajorKey() { return KeyedLoadFastElement; } |
| 942 int MinorKey() { return 0; } |
| 943 |
| 944 void Generate(MacroAssembler* masm); |
| 945 |
| 946 const char* GetName() { return "KeyedLoadFastElementStub"; } |
| 947 |
| 948 DECLARE_ARRAY_STUB_PRINT(KeyedLoadFastElementStub) |
| 949 }; |
| 950 |
| 951 |
| 952 class KeyedStoreFastElementStub : public CodeStub { |
| 953 public: |
| 954 explicit KeyedStoreFastElementStub(bool is_js_array) |
| 955 : is_js_array_(is_js_array) { } |
| 956 |
| 957 Major MajorKey() { return KeyedStoreFastElement; } |
| 958 int MinorKey() { return is_js_array_ ? 1 : 0; } |
| 959 |
| 960 void Generate(MacroAssembler* masm); |
| 961 |
| 962 const char* GetName() { return "KeyedStoreFastElementStub"; } |
| 963 |
| 964 DECLARE_ARRAY_STUB_PRINT(KeyedStoreFastElementStub) |
| 965 |
| 966 private: |
| 967 bool is_js_array_; |
| 968 }; |
| 969 |
| 970 |
| 971 class KeyedLoadExternalArrayStub : public CodeStub { |
| 972 public: |
| 973 explicit KeyedLoadExternalArrayStub(ExternalArrayType array_type) |
| 974 : array_type_(array_type) { } |
| 975 |
| 976 Major MajorKey() { return KeyedLoadExternalArray; } |
| 977 int MinorKey() { return array_type_; } |
| 978 |
| 979 void Generate(MacroAssembler* masm); |
| 980 |
| 981 const char* GetName() { return "KeyedLoadExternalArrayStub"; } |
| 982 |
| 983 DECLARE_ARRAY_STUB_PRINT(KeyedLoadExternalArrayStub) |
| 984 |
| 985 protected: |
| 986 ExternalArrayType array_type_; |
| 987 }; |
| 988 |
| 989 |
| 990 class KeyedStoreExternalArrayStub : public CodeStub { |
| 991 public: |
| 992 explicit KeyedStoreExternalArrayStub(ExternalArrayType array_type) |
| 993 : array_type_(array_type) { } |
| 994 |
| 995 Major MajorKey() { return KeyedStoreExternalArray; } |
| 996 int MinorKey() { return array_type_; } |
| 997 |
| 998 void Generate(MacroAssembler* masm); |
| 999 |
| 1000 const char* GetName() { return "KeyedStoreExternalArrayStub"; } |
| 1001 |
| 1002 DECLARE_ARRAY_STUB_PRINT(KeyedStoreExternalArrayStub) |
| 1003 |
| 1004 protected: |
| 1005 ExternalArrayType array_type_; |
| 1006 }; |
| 1007 |
| 1008 |
925 } } // namespace v8::internal | 1009 } } // namespace v8::internal |
926 | 1010 |
927 #endif // V8_CODE_STUBS_H_ | 1011 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |