| Index: src/heap.h
|
| ===================================================================
|
| --- src/heap.h (revision 9139)
|
| +++ src/heap.h (working copy)
|
| @@ -77,6 +77,7 @@
|
| V(Object, instanceof_cache_map, InstanceofCacheMap) \
|
| V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \
|
| V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \
|
| + V(FixedArray, string_split_cache, StringSplitCache) \
|
| V(Object, termination_exception, TerminationException) \
|
| V(FixedArray, empty_fixed_array, EmptyFixedArray) \
|
| V(ByteArray, empty_byte_array, EmptyByteArray) \
|
| @@ -2176,6 +2177,27 @@
|
| };
|
|
|
|
|
| +class StringSplitCache {
|
| + public:
|
| + static Object* Lookup(FixedArray* cache, String* string, String* pattern);
|
| + static void Enter(Heap* heap,
|
| + FixedArray* cache,
|
| + String* string,
|
| + String* pattern,
|
| + FixedArray* array);
|
| + static void Clear(FixedArray* cache);
|
| + static const int kStringSplitCacheSize = 0x100;
|
| +
|
| + private:
|
| + static const int kArrayEntriesPerCacheEntry = 4;
|
| + static const int kStringOffset = 0;
|
| + static const int kPatternOffset = 1;
|
| + static const int kArrayOffset = 2;
|
| +
|
| + static MaybeObject* WrapFixedArrayInJSArray(Object* fixed_array);
|
| +};
|
| +
|
| +
|
| class TranscendentalCache {
|
| public:
|
| enum Type {ACOS, ASIN, ATAN, COS, EXP, LOG, SIN, TAN, kNumberOfCaches};
|
|
|