| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 Code::Flags GetCodeFlags() const; | 284 Code::Flags GetCodeFlags() const; |
| 285 | 285 |
| 286 friend std::ostream& operator<<(std::ostream& os, const CodeStub& s) { | 286 friend std::ostream& operator<<(std::ostream& os, const CodeStub& s) { |
| 287 s.PrintName(os); | 287 s.PrintName(os); |
| 288 return os; | 288 return os; |
| 289 } | 289 } |
| 290 | 290 |
| 291 Isolate* isolate() const { return isolate_; } | 291 Isolate* isolate() const { return isolate_; } |
| 292 | 292 |
| 293 void DeleteStubFromCacheForTesting(); |
| 294 |
| 293 protected: | 295 protected: |
| 294 CodeStub(uint32_t key, Isolate* isolate) | 296 CodeStub(uint32_t key, Isolate* isolate) |
| 295 : minor_key_(MinorKeyFromKey(key)), isolate_(isolate) {} | 297 : minor_key_(MinorKeyFromKey(key)), isolate_(isolate) {} |
| 296 | 298 |
| 297 // Generates the assembler code for the stub. | 299 // Generates the assembler code for the stub. |
| 298 virtual Handle<Code> GenerateCode() = 0; | 300 virtual Handle<Code> GenerateCode() = 0; |
| 299 | 301 |
| 300 // Returns whether the code generated for this stub needs to be allocated as | 302 // Returns whether the code generated for this stub needs to be allocated as |
| 301 // a fixed (non-moveable) code object. | 303 // a fixed (non-moveable) code object. |
| 302 virtual bool NeedsImmovableCode() { return false; } | 304 virtual bool NeedsImmovableCode() { return false; } |
| (...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2641 #undef DEFINE_PLATFORM_CODE_STUB | 2643 #undef DEFINE_PLATFORM_CODE_STUB |
| 2642 #undef DEFINE_HANDLER_CODE_STUB | 2644 #undef DEFINE_HANDLER_CODE_STUB |
| 2643 #undef DEFINE_HYDROGEN_CODE_STUB | 2645 #undef DEFINE_HYDROGEN_CODE_STUB |
| 2644 #undef DEFINE_CODE_STUB | 2646 #undef DEFINE_CODE_STUB |
| 2645 #undef DEFINE_CODE_STUB_BASE | 2647 #undef DEFINE_CODE_STUB_BASE |
| 2646 | 2648 |
| 2647 } // namespace internal | 2649 } // namespace internal |
| 2648 } // namespace v8 | 2650 } // namespace v8 |
| 2649 | 2651 |
| 2650 #endif // V8_CODE_STUBS_H_ | 2652 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |