Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 121140d1bae670b1a364d100024bcf2815163c45..63461bc0c09d6a3592282297bcc4240935f900a4 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -75,6 +75,7 @@ class CodeStub BASE_EMBEDDED { |
#define DEF_ENUM(name) name, |
CODE_STUB_LIST(DEF_ENUM) |
#undef DEF_ENUM |
+ NoCache, // marker for stubs that do custom caching |
NUMBER_OF_IDS |
}; |
@@ -91,6 +92,12 @@ class CodeStub BASE_EMBEDDED { |
virtual ~CodeStub() {} |
+ // Override these methods to provide a custom caching mechanism for |
+ // an individual type of code stub. |
+ virtual bool GetCustomCache(Code** code_out) { return false; } |
+ virtual void SetCustomCache(Code* value) { } |
+ virtual bool has_custom_cache() { return false; } |
+ |
protected: |
static const int kMajorBits = 5; |
static const int kMinorBits = kBitsPerInt - kSmiTagSize - kMajorBits; |