#define NumericStrings_h
#include "UString.h"
+#include <wtf/FixedArray.h>
#include <wtf/HashFunctions.h>
namespace JSC {
if (d == entry.key && !entry.value.isNull())
return entry.value;
entry.key = d;
- entry.value = UString::from(d);
+ entry.value = UString::number(d);
return entry.value;
}
if (i == entry.key && !entry.value.isNull())
return entry.value;
entry.key = i;
- entry.value = UString::from(i);
+ entry.value = UString::number(i);
return entry.value;
}
if (i == entry.key && !entry.value.isNull())
return entry.value;
entry.key = i;
- entry.value = UString::from(i);
+ entry.value = UString::number(i);
return entry.value;
}
private:
{
ASSERT(i < cacheSize);
if (smallIntCache[i].isNull())
- smallIntCache[i] = UString::from(i);
+ smallIntCache[i] = UString::number(i);
return smallIntCache[i];
}
- CacheEntry<double> doubleCache[cacheSize];
- CacheEntry<int> intCache[cacheSize];
- CacheEntry<unsigned> unsignedCache[cacheSize];
- UString smallIntCache[cacheSize];
+ FixedArray<CacheEntry<double>, cacheSize> doubleCache;
+ FixedArray<CacheEntry<int>, cacheSize> intCache;
+ FixedArray<CacheEntry<unsigned>, cacheSize> unsignedCache;
+ FixedArray<UString, cacheSize> smallIntCache;
};
} // namespace JSC