Bug 925541 - Remove TypedObject.cpp's unused InRange() functions. r=nmatsakis
authorChris Peterson <cpeterson@mozilla.com>
Thu, 10 Oct 2013 12:02:04 -0700
changeset 164372 368ed1ff1ae665b4d9b9357df8658064a45073ad
parent 164371 e807ddf2965f621d2948a44b7631ebd6ee5d5135
child 164373 38e88a332eeb94a446af1d1833140e81afec8767
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnmatsakis
bugs925541
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 925541 - Remove TypedObject.cpp's unused InRange() functions. r=nmatsakis
js/src/builtin/TypedObject.cpp
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -314,56 +314,16 @@ TypeEquivalent(JSContext *cx, unsigned i
     nullptr,                                                                  \
     nullptr                                                                   \
 },
 
 const Class js::NumericTypeClasses[ScalarTypeRepresentation::TYPE_MAX] = {
     JS_FOR_EACH_SCALAR_TYPE_REPR(BINARYDATA_NUMERIC_CLASSES)
 };
 
-template <typename Domain, typename Input>
-static bool
-InRange(Input x)
-{
-    return std::numeric_limits<Domain>::min() <= x &&
-           x <= std::numeric_limits<Domain>::max();
-}
-
-template <>
-bool
-InRange<float, int>(int x)
-{
-    return -std::numeric_limits<float>::max() <= x &&
-           x <= std::numeric_limits<float>::max();
-}
-
-template <>
-bool
-InRange<double, int>(int x)
-{
-    return -std::numeric_limits<double>::max() <= x &&
-           x <= std::numeric_limits<double>::max();
-}
-
-template <>
-bool
-InRange<float, double>(double x)
-{
-    return -std::numeric_limits<float>::max() <= x &&
-           x <= std::numeric_limits<float>::max();
-}
-
-template <>
-bool
-InRange<double, double>(double x)
-{
-    return -std::numeric_limits<double>::max() <= x &&
-           x <= std::numeric_limits<double>::max();
-}
-
 #define BINARYDATA_TYPE_TO_CLASS(constant_, type_, name_)                     \
     template <>                                                               \
     const Class *                                                             \
     NumericType<constant_, type_>::typeToClass()                              \
     {                                                                         \
         return &NumericTypeClasses[constant_];                                \
     }