Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(894)

Unified Diff: src/objects.h

Issue 1563005: Introduce fast native caches and use it in String.search. (Closed)
Patch Set: Last round :) Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/macros.py ('k') | src/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index b07792cd5070cbceb87dc5cfbfb68f8a35c6beb9..0167834338a9008e332bf56b8cfc3c5381da7ac9 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -76,6 +76,7 @@
// - MapCache
// - Context
// - GlobalContext
+// - JSFunctionResultCache
// - String
// - SeqString
// - SeqAsciiString
@@ -2307,6 +2308,23 @@ class NumberDictionary: public Dictionary<NumberDictionaryShape, uint32_t> {
};
+// JSFunctionResultCache caches results of some JSFunction invocation.
+// It is a fixed array with fixed structure:
+// [0]: factory function
+// [1]: finger index
+// [2]: current cache size
+// [3]: dummy field.
+// The rest of array are key/value pairs.
+class JSFunctionResultCache: public FixedArray {
+ public:
+ static const int kFactoryIndex = 0;
+ static const int kFingerIndex = kFactoryIndex + 1;
+ static const int kCacheSizeIndex = kFingerIndex + 1;
+ static const int kDummyIndex = kCacheSizeIndex + 1;
+ static const int kEntriesIndex = kDummyIndex + 1;
+};
+
+
// ByteArray represents fixed sized byte arrays. Used by the outside world,
// such as PCRE, and also by the memory allocator and garbage collector to
// fill in free blocks in the heap.
« no previous file with comments | « src/macros.py ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698