| Index: src/heap.h
|
| diff --git a/src/heap.h b/src/heap.h
|
| index d2d69618934f3eb7799423a1ecec2941ce750bd3..871c4d809e4778a9dac3312189e1fa0754e3c47d 100644
|
| --- a/src/heap.h
|
| +++ b/src/heap.h
|
| @@ -2894,85 +2894,6 @@ class RegExpResultsCache {
|
| };
|
|
|
|
|
| -class TranscendentalCache {
|
| - public:
|
| - enum Type { LOG, kNumberOfCaches};
|
| - static const int kTranscendentalTypeBits = 3;
|
| - STATIC_ASSERT((1 << kTranscendentalTypeBits) >= kNumberOfCaches);
|
| -
|
| - // Returns a heap number with f(input), where f is a math function specified
|
| - // by the 'type' argument.
|
| - MUST_USE_RESULT inline MaybeObject* Get(Type type, double input);
|
| -
|
| - // The cache contains raw Object pointers. This method disposes of
|
| - // them before a garbage collection.
|
| - void Clear();
|
| -
|
| - private:
|
| - class SubCache {
|
| - static const int kCacheSize = 512;
|
| -
|
| - explicit SubCache(Isolate* isolate, Type t);
|
| -
|
| - MUST_USE_RESULT inline MaybeObject* Get(double input);
|
| -
|
| - inline double Calculate(double input);
|
| -
|
| - struct Element {
|
| - uint32_t in[2];
|
| - Object* output;
|
| - };
|
| -
|
| - union Converter {
|
| - double dbl;
|
| - uint32_t integers[2];
|
| - };
|
| -
|
| - inline static int Hash(const Converter& c) {
|
| - uint32_t hash = (c.integers[0] ^ c.integers[1]);
|
| - hash ^= static_cast<int32_t>(hash) >> 16;
|
| - hash ^= static_cast<int32_t>(hash) >> 8;
|
| - return (hash & (kCacheSize - 1));
|
| - }
|
| -
|
| - Element elements_[kCacheSize];
|
| - Type type_;
|
| - Isolate* isolate_;
|
| -
|
| - // Allow access to the caches_ array as an ExternalReference.
|
| - friend class ExternalReference;
|
| - // Inline implementation of the cache.
|
| - friend class TranscendentalCacheStub;
|
| - // For evaluating value.
|
| - friend class TranscendentalCache;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(SubCache);
|
| - };
|
| -
|
| - explicit TranscendentalCache(Isolate* isolate) : isolate_(isolate) {
|
| - for (int i = 0; i < kNumberOfCaches; ++i) caches_[i] = NULL;
|
| - }
|
| -
|
| - ~TranscendentalCache() {
|
| - for (int i = 0; i < kNumberOfCaches; ++i) delete caches_[i];
|
| - }
|
| -
|
| - // Used to create an external reference.
|
| - inline Address cache_array_address();
|
| -
|
| - // Instantiation
|
| - friend class Isolate;
|
| - // Inline implementation of the caching.
|
| - friend class TranscendentalCacheStub;
|
| - // Allow access to the caches_ array as an ExternalReference.
|
| - friend class ExternalReference;
|
| -
|
| - Isolate* isolate_;
|
| - SubCache* caches_[kNumberOfCaches];
|
| - DISALLOW_COPY_AND_ASSIGN(TranscendentalCache);
|
| -};
|
| -
|
| -
|
| // Abstract base class for checking whether a weak object should be retained.
|
| class WeakObjectRetainer {
|
| public:
|
|
|