Bug 1447442 - Part 12: Remove unused HAVE_HYPOT from old-configure and update comments in hypot function. r=jorendorff
authorAndré Bargull <andre.bargull@gmail.com>
Fri, 13 Apr 2018 02:26:01 -0700
changeset 413340 2b300e277494b2aa2ed79d36118f4aa4b84e328e
parent 413339 109933956ea91fad2b5722c2161715cb408b3178
child 413341 70d1fd2ca5c6cc4f830dcd3f049c53f24b3597aa
push id33843
push usernerli@mozilla.com
push dateSat, 14 Apr 2018 09:49:25 +0000
treeherdermozilla-central@37b8862d354e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1447442
milestone61.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 1447442 - Part 12: Remove unused HAVE_HYPOT from old-configure and update comments in hypot function. r=jorendorff
js/src/jsmath.cpp
js/src/old-configure.in
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -1250,17 +1250,16 @@ js::math_atanh_uncached(double x)
 }
 
 bool
 js::math_atanh(JSContext* cx, unsigned argc, Value* vp)
 {
     return math_function<math_atanh_impl>(cx, argc, vp);
 }
 
-/* Consistency wrapper for platform deviations in hypot() */
 double
 js::ecmaHypot(double x, double y)
 {
     AutoUnsafeCallWithABI unsafe;
     return fdlibm::hypot(x, y);
 }
 
 static inline
@@ -1276,19 +1275,17 @@ hypot_step(double& scale, double& sumsq,
     }
 }
 
 double
 js::hypot4(double x, double y, double z, double w)
 {
     AutoUnsafeCallWithABI unsafe;
 
-    /* Check for infinity or NaNs so that we can return immediatelly.
-     * Does not need to be WIN_XP specific as ecmaHypot
-     */
+    // Check for infinities or NaNs so that we can return immediately.
     if (mozilla::IsInfinite(x) || mozilla::IsInfinite(y) ||
             mozilla::IsInfinite(z) || mozilla::IsInfinite(w))
         return mozilla::PositiveInfinity<double>();
 
     if (mozilla::IsNaN(x) || mozilla::IsNaN(y) || mozilla::IsNaN(z) ||
             mozilla::IsNaN(w))
         return GenericNaN();
 
@@ -1315,17 +1312,17 @@ js::math_hypot(JSContext* cx, unsigned a
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     return math_hypot_handle(cx, args, args.rval());
 }
 
 bool
 js::math_hypot_handle(JSContext* cx, HandleValueArray args, MutableHandleValue res)
 {
-    // IonMonkey calls the system hypot function directly if two arguments are
+    // IonMonkey calls the ecmaHypot function directly if two arguments are
     // given. Do that here as well to get the same results.
     if (args.length() == 2) {
         double x, y;
         if (!ToNumber(cx, args[0], &x))
             return false;
         if (!ToNumber(cx, args[1], &y))
             return false;
 
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -276,17 +276,16 @@ if test -n "$_WIN32_MSVC"; then
     SKIP_LIBRARY_CHECKS=1
 
     # Since we're skipping compiler and library checks, hard-code
     # some facts here.
 
     # Common to all MSVC environments:
 
     AC_DEFINE(HAVE_LOCALECONV)
-    AC_DEFINE(HAVE_HYPOT)
     AC_CHECK_FUNCS([_getc_nolock])
 fi
 
 fi # COMPILE_ENVIRONMENT
 
 # Check to see if we are running in a broken QEMU scratchbox.
 # We know that anything below 1.0.16 is broken.
 AC_CHECK_PROGS(SBCONF, sb-conf ve, "")