#include "config.h"
#include "JSNumberCell.h"
+#if USE(JSVALUE32)
+
#include "NumberObject.h"
#include "UString.h"
namespace JSC {
-#if !USE(ALTERNATE_JSIMMEDIATE)
-
-JSValuePtr JSNumberCell::toPrimitive(ExecState*, PreferredPrimitiveType) const
+JSValue JSNumberCell::toPrimitive(ExecState*, PreferredPrimitiveType) const
{
return const_cast<JSNumberCell*>(this);
}
-bool JSNumberCell::getPrimitiveNumber(ExecState*, double& number, JSValuePtr& value)
+bool JSNumberCell::getPrimitiveNumber(ExecState*, double& number, JSValue& value)
{
number = m_value;
value = this;
return uint32 == m_value;
}
-bool JSNumberCell::getTruncatedInt32(int32_t& int32) const
-{
- if (!(m_value >= -2147483648.0 && m_value < 2147483648.0))
- return false;
- int32 = static_cast<int32_t>(m_value);
- return true;
-}
-
-bool JSNumberCell::getTruncatedUInt32(uint32_t& uint32) const
-{
- if (!(m_value >= 0.0 && m_value < 4294967296.0))
- return false;
- uint32 = static_cast<uint32_t>(m_value);
- return true;
-}
-
-JSValuePtr JSNumberCell::getJSNumber()
+JSValue JSNumberCell::getJSNumber()
{
return this;
}
-JSValuePtr jsNumberCell(ExecState* exec, double d)
+JSValue jsNumberCell(ExecState* exec, double d)
{
return new (exec) JSNumberCell(exec, d);
}
-JSValuePtr jsNumberCell(JSGlobalData* globalData, double d)
+JSValue jsNumberCell(JSGlobalData* globalData, double d)
{
return new (globalData) JSNumberCell(globalData, d);
}
-#else
+} // namespace JSC
-JSValuePtr jsNumberCell(ExecState*, double)
+#else // USE(JSVALUE32)
+
+// Keep our exported symbols lists happy.
+namespace JSC {
+
+JSValue jsNumberCell(ExecState*, double);
+
+JSValue jsNumberCell(ExecState*, double)
{
ASSERT_NOT_REACHED();
- return noValue();
+ return JSValue();
}
-#endif
-
} // namespace JSC
+
+#endif // USE(JSVALUE32)