From bd5d832b2faad843ec3db0d1cb3ca03a3aca537e Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Fri, 20 Jan 2012 23:39:32 -0800 Subject: [PATCH] Bug 720094 - Simplify the implementation of JSDOUBLE_IS_NaN a bit, consolidating two implementations (conditioned on the architecture) into one. r=dvander --- js/src/jsnum.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/src/jsnum.h b/js/src/jsnum.h index 735c02665d3b..b53627dd4ffa 100644 --- a/js/src/jsnum.h +++ b/js/src/jsnum.h @@ -92,11 +92,8 @@ JSDOUBLE_IS_NaN(jsdouble d) { jsdpun u; u.d = d; -#if defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) - return (u.u64 & ~JSDOUBLE_SIGNBIT) > JSDOUBLE_EXPMASK; -#else - return (u.s.hi & JSDOUBLE_HI32_NAN) == JSDOUBLE_HI32_NAN; -#endif + return (u.u64 & JSDOUBLE_EXPMASK) == JSDOUBLE_EXPMASK && + (u.u64 & JSDOUBLE_MANTMASK) != 0; } static inline int