diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-06-21 23:16:08 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-06-21 23:16:08 (GMT) |
commit | 511d86e88b33380116f27d5f6a2a0754e8f62fa0 (patch) | |
tree | 6fdcb11b5270984112bc2563738c24d2891595d4 /src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp | |
parent | aae3c899b10bee2dd64bb00bb2832620a47cff87 (diff) | |
parent | fbf9db1fc6b500bfe05fdfca121986687d73d5c6 (diff) | |
download | Qt-511d86e88b33380116f27d5f6a2a0754e8f62fa0.zip Qt-511d86e88b33380116f27d5f6a2a0754e8f62fa0.tar.gz Qt-511d86e88b33380116f27d5f6a2a0754e8f62fa0.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp index 73580b0..885914d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp @@ -33,18 +33,16 @@ static const double D32 = 4294967296.0; // ECMA 9.4 double JSValue::toInteger(ExecState* exec) const { - int32_t i; - if (getTruncatedInt32(i)) - return i; + if (isInt32Fast()) + return getInt32Fast(); double d = toNumber(exec); return isnan(d) ? 0.0 : trunc(d); } double JSValue::toIntegerPreserveNaN(ExecState* exec) const { - int32_t i; - if (getTruncatedInt32(i)) - return i; + if (isInt32Fast()) + return getInt32Fast(); return trunc(toNumber(exec)); } @@ -68,11 +66,6 @@ int32_t toInt32SlowCase(double d, bool& ok) return static_cast<int32_t>(d32); } -int32_t JSValue::toInt32SlowCase(ExecState* exec, bool& ok) const -{ - return JSC::toInt32SlowCase(toNumber(exec), ok); -} - uint32_t toUInt32SlowCase(double d, bool& ok) { ok = true; @@ -91,14 +84,4 @@ uint32_t toUInt32SlowCase(double d, bool& ok) return static_cast<uint32_t>(d32); } -uint32_t JSValue::toUInt32SlowCase(ExecState* exec, bool& ok) const -{ - return JSC::toUInt32SlowCase(toNumber(exec), ok); -} - -float JSValue::toFloat(ExecState* exec) const -{ - return static_cast<float>(toNumber(exec)); -} - } // namespace JSC |