Chromium Code Reviews| 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 914 masm_->set_allow_stub_calls(previous_allow_); | 918 masm_->set_allow_stub_calls(previous_allow_); |
| 915 } | 919 } |
| 916 | 920 |
| 917 private: | 921 private: |
| 918 MacroAssembler* masm_; | 922 MacroAssembler* masm_; |
| 919 bool previous_allow_; | 923 bool previous_allow_; |
| 920 | 924 |
| 921 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); | 925 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); |
| 922 }; | 926 }; |
| 923 | 927 |
| 928 #ifdef DEBUG | |
| 929 #define DECLARE_ARRAY_STUB_PRINT(name) void Print() { PrintF(#name); } | |
| 930 #else | |
| 931 #define DECLARE_ARRAY_STUB_PRINT(name) | |
| 932 #endif | |
| 933 | |
| 934 | |
| 935 class KeyedLoadFastElementStub : public CodeStub { | |
| 936 public: | |
| 937 explicit KeyedLoadFastElementStub() { | |
| 938 } | |
| 939 | |
| 940 Major MajorKey() { return KeyedLoadFastElement; } | |
| 941 int MinorKey() { return 0; } | |
| 942 | |
| 943 void Generate(MacroAssembler* masm); | |
| 944 | |
| 945 const char* GetName() { return "KeyedLoadFastElementStub"; } | |
| 946 | |
| 947 DECLARE_ARRAY_STUB_PRINT(KeyedLoadFastElementStub) | |
| 948 | |
| 949 private: | |
| 950 bool is_js_array_; | |
|
Mads Ager (chromium)
2011/05/12 09:42:47
Remove, this is unused?
danno
2011/06/01 13:16:08
Done.
| |
| 951 }; | |
| 952 | |
| 953 | |
| 954 class KeyedStoreFastElementStub : public CodeStub { | |
| 955 public: | |
| 956 explicit KeyedStoreFastElementStub(bool is_js_array) | |
| 957 : is_js_array_(is_js_array) { } | |
| 958 | |
| 959 Major MajorKey() { return KeyedStoreFastElement; } | |
| 960 int MinorKey() { return is_js_array_; } | |
|
Mads Ager (chromium)
2011/05/12 09:42:47
Let's do an explicit type conversion here:
return
danno
2011/06/01 13:16:08
Done.
| |
| 961 | |
| 962 void Generate(MacroAssembler* masm); | |
| 963 | |
| 964 const char* GetName() { return "KeyedStoreFastElementStub"; } | |
| 965 | |
| 966 DECLARE_ARRAY_STUB_PRINT(KeyedStoreFastElementStub) | |
| 967 | |
| 968 private: | |
| 969 bool is_js_array_; | |
| 970 }; | |
| 971 | |
| 972 | |
| 973 class KeyedLoadExternalArrayStub : public CodeStub { | |
| 974 public: | |
| 975 explicit KeyedLoadExternalArrayStub(ExternalArrayType array_type) | |
| 976 : array_type_(array_type) { } | |
| 977 | |
| 978 Major MajorKey() { return KeyedLoadExternalArray; } | |
| 979 int MinorKey() { return array_type_; } | |
| 980 | |
| 981 void Generate(MacroAssembler* masm); | |
| 982 | |
| 983 const char* GetName() { return "KeyedLoadExternalArrayStub"; } | |
| 984 | |
| 985 DECLARE_ARRAY_STUB_PRINT(KeyedLoadExternalArrayStub) | |
| 986 | |
| 987 protected: | |
| 988 ExternalArrayType array_type_; | |
| 989 }; | |
| 990 | |
| 991 | |
| 992 class KeyedStoreExternalArrayStub : public CodeStub { | |
| 993 public: | |
| 994 explicit KeyedStoreExternalArrayStub(ExternalArrayType array_type) | |
| 995 : array_type_(array_type) { } | |
| 996 | |
| 997 Major MajorKey() { return KeyedStoreExternalArray; } | |
| 998 int MinorKey() { return array_type_; } | |
| 999 | |
| 1000 void Generate(MacroAssembler* masm); | |
| 1001 | |
| 1002 const char* GetName() { return "KeyedStoreExternalArrayStub"; } | |
| 1003 | |
| 1004 DECLARE_ARRAY_STUB_PRINT(KeyedStoreExternalArrayStub) | |
| 1005 | |
| 1006 protected: | |
| 1007 ExternalArrayType array_type_; | |
| 1008 }; | |
| 1009 | |
| 1010 | |
| 924 } } // namespace v8::internal | 1011 } } // namespace v8::internal |
| 925 | 1012 |
| 926 #endif // V8_CODE_STUBS_H_ | 1013 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |