X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/14957cd040308e3eeec43d26bae5d76da13fcd85..4be4e30906bcb8ee30b4d189205cb70bad6707ce:/parser/SourceProviderCache.h diff --git a/parser/SourceProviderCache.h b/parser/SourceProviderCache.h index 4df46f7..06b6c45 100644 --- a/parser/SourceProviderCache.h +++ b/parser/SourceProviderCache.h @@ -23,26 +23,31 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef SourceProviderCache_h +#define SourceProviderCache_h + +#include "SourceProviderCacheItem.h" #include +#include #include +#include namespace JSC { -class SourceProviderCacheItem; - -class SourceProviderCache { +class SourceProviderCache : public RefCounted { + WTF_MAKE_FAST_ALLOCATED; public: - SourceProviderCache() : m_contentByteSize(0) {} - ~SourceProviderCache(); + SourceProviderCache() { } + JS_EXPORT_PRIVATE ~SourceProviderCache(); - void clear(); - unsigned byteSize() const; - void add(int sourcePosition, PassOwnPtr, unsigned size); + JS_EXPORT_PRIVATE void clear(); + void add(int sourcePosition, PassOwnPtr); const SourceProviderCacheItem* get(int sourcePosition) const { return m_map.get(sourcePosition); } private: - HashMap m_map; - unsigned m_contentByteSize; + HashMap > m_map; }; } + +#endif // SourceProviderCache_h