summaryrefslogtreecommitdiff
path: root/deps/v8/src/code-stubs.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/code-stubs.h')
-rw-r--r--deps/v8/src/code-stubs.h45
1 files changed, 26 insertions, 19 deletions
diff --git a/deps/v8/src/code-stubs.h b/deps/v8/src/code-stubs.h
index 121140d1ba..6c50c6db0e 100644
--- a/deps/v8/src/code-stubs.h
+++ b/deps/v8/src/code-stubs.h
@@ -33,23 +33,23 @@ namespace internal {
// List of code stubs used on all platforms. The order in this list is important
// as only the stubs up to and including RecordWrite allows nested stub calls.
-#define CODE_STUB_LIST_ALL(V) \
- V(CallFunction) \
- V(GenericBinaryOp) \
- V(SmiOp) \
- V(Compare) \
- V(RecordWrite) \
- V(ConvertToDouble) \
- V(WriteInt32ToHeapNumber) \
- V(StackCheck) \
- V(UnarySub) \
- V(RevertToNumber) \
- V(ToBoolean) \
- V(Instanceof) \
- V(CounterOp) \
- V(ArgumentsAccess) \
- V(Runtime) \
- V(CEntry) \
+#define CODE_STUB_LIST_ALL_PLATFORMS(V) \
+ V(CallFunction) \
+ V(GenericBinaryOp) \
+ V(SmiOp) \
+ V(Compare) \
+ V(RecordWrite) \
+ V(ConvertToDouble) \
+ V(WriteInt32ToHeapNumber) \
+ V(StackCheck) \
+ V(UnarySub) \
+ V(RevertToNumber) \
+ V(ToBoolean) \
+ V(Instanceof) \
+ V(CounterOp) \
+ V(ArgumentsAccess) \
+ V(Runtime) \
+ V(CEntry) \
V(JSEntry)
// List of code stubs only used on ARM platforms.
@@ -64,8 +64,8 @@ namespace internal {
#endif
// Combined list of code stubs.
-#define CODE_STUB_LIST(V) \
- CODE_STUB_LIST_ALL(V) \
+#define CODE_STUB_LIST(V) \
+ CODE_STUB_LIST_ALL_PLATFORMS(V) \
CODE_STUB_LIST_ARM(V)
// Stub is base classes of all stubs.
@@ -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;