| 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/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 #define CODE_STUB_LIST(V) \ | 129 #define CODE_STUB_LIST(V) \ |
| 130 CODE_STUB_LIST_ALL_PLATFORMS(V) \ | 130 CODE_STUB_LIST_ALL_PLATFORMS(V) \ |
| 131 CODE_STUB_LIST_ARM(V) \ | 131 CODE_STUB_LIST_ARM(V) \ |
| 132 CODE_STUB_LIST_ARM64(V) \ | 132 CODE_STUB_LIST_ARM64(V) \ |
| 133 CODE_STUB_LIST_MIPS(V) | 133 CODE_STUB_LIST_MIPS(V) |
| 134 | 134 |
| 135 // Stub is base classes of all stubs. | 135 // Stub is base classes of all stubs. |
| 136 class CodeStub BASE_EMBEDDED { | 136 class CodeStub BASE_EMBEDDED { |
| 137 public: | 137 public: |
| 138 enum Major { | 138 enum Major { |
| 139 // TODO(mvstanton): eliminate the NoCache key by getting rid |
| 140 // of the non-monomorphic-cache. |
| 141 NoCache = 0, // marker for stubs that do custom caching] |
| 139 #define DEF_ENUM(name) name, | 142 #define DEF_ENUM(name) name, |
| 140 CODE_STUB_LIST(DEF_ENUM) | 143 CODE_STUB_LIST(DEF_ENUM) |
| 141 #undef DEF_ENUM | 144 #undef DEF_ENUM |
| 142 NoCache, // marker for stubs that do custom caching | |
| 143 NUMBER_OF_IDS | 145 NUMBER_OF_IDS |
| 144 }; | 146 }; |
| 145 | 147 |
| 146 // Retrieve the code for the stub. Generate the code if needed. | 148 // Retrieve the code for the stub. Generate the code if needed. |
| 147 Handle<Code> GetCode(); | 149 Handle<Code> GetCode(); |
| 148 | 150 |
| 149 // Retrieve the code for the stub, make and return a copy of the code. | 151 // Retrieve the code for the stub, make and return a copy of the code. |
| 150 Handle<Code> GetCodeCopy(const Code::FindAndReplacePattern& pattern); | 152 Handle<Code> GetCodeCopy(const Code::FindAndReplacePattern& pattern); |
| 151 | 153 |
| 152 static Major MajorKeyFromKey(uint32_t key) { | 154 static Major MajorKeyFromKey(uint32_t key) { |
| (...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2428 | 2430 |
| 2429 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2431 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
| 2430 #undef DEFINE_PLATFORM_CODE_STUB | 2432 #undef DEFINE_PLATFORM_CODE_STUB |
| 2431 #undef DEFINE_HANDLER_CODE_STUB | 2433 #undef DEFINE_HANDLER_CODE_STUB |
| 2432 #undef DEFINE_HYDROGEN_CODE_STUB | 2434 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2433 #undef DEFINE_CODE_STUB | 2435 #undef DEFINE_CODE_STUB |
| 2434 #undef DEFINE_CODE_STUB_BASE | 2436 #undef DEFINE_CODE_STUB_BASE |
| 2435 } } // namespace v8::internal | 2437 } } // namespace v8::internal |
| 2436 | 2438 |
| 2437 #endif // V8_CODE_STUBS_H_ | 2439 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |