X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/6fe7ccc865dc7d7541b93c5bcaf6368d2c98a174..2656c66b5b30d5597e842a751c7f19ad6c2fe31a:/runtime/DateInstanceCache.h diff --git a/runtime/DateInstanceCache.h b/runtime/DateInstanceCache.h index 153582f..0705306 100644 --- a/runtime/DateInstanceCache.h +++ b/runtime/DateInstanceCache.h @@ -26,8 +26,9 @@ #ifndef DateInstanceCache_h #define DateInstanceCache_h +#include "JSCJSValue.h" #include "JSDateMath.h" -#include +#include #include #include #include @@ -45,8 +46,8 @@ namespace JSC { private: DateInstanceData() - : m_gregorianDateTimeCachedForMS(std::numeric_limits::quiet_NaN()) - , m_gregorianDateTimeUTCCachedForMS(std::numeric_limits::quiet_NaN()) + : m_gregorianDateTimeCachedForMS(PNaN) + , m_gregorianDateTimeUTCCachedForMS(PNaN) { } }; @@ -61,7 +62,7 @@ namespace JSC { void reset() { for (size_t i = 0; i < cacheSize; ++i) - m_cache[i].key = std::numeric_limits::quiet_NaN(); + m_cache[i].key = PNaN; } DateInstanceData* add(double d) @@ -85,7 +86,7 @@ namespace JSC { CacheEntry& lookup(double d) { return m_cache[WTF::FloatHash::hash(d) & (cacheSize - 1)]; } - FixedArray m_cache; + std::array m_cache; }; } // namespace JSC