#ifndef DateInstanceCache_h
#define DateInstanceCache_h
+#include "JSCJSValue.h"
#include "JSDateMath.h"
-#include <wtf/FixedArray.h>
+#include <array>
#include <wtf/HashFunctions.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
private:
DateInstanceData()
- : m_gregorianDateTimeCachedForMS(std::numeric_limits<double>::quiet_NaN())
- , m_gregorianDateTimeUTCCachedForMS(std::numeric_limits<double>::quiet_NaN())
+ : m_gregorianDateTimeCachedForMS(PNaN)
+ , m_gregorianDateTimeUTCCachedForMS(PNaN)
{
}
};
void reset()
{
for (size_t i = 0; i < cacheSize; ++i)
- m_cache[i].key = std::numeric_limits<double>::quiet_NaN();
+ m_cache[i].key = PNaN;
}
DateInstanceData* add(double d)
CacheEntry& lookup(double d) { return m_cache[WTF::FloatHash<double>::hash(d) & (cacheSize - 1)]; }
- FixedArray<CacheEntry, cacheSize> m_cache;
+ std::array<CacheEntry, cacheSize> m_cache;
};
} // namespace JSC