Bug 918350 - SpiderMonkey: Fix a compile error on Windows too.
authorDan Gohman <sunfish@google.com>
Thu, 19 Sep 2013 19:34:54 -0700
changeset 161857 e309a5ebdd9b0470d2d88ffbbf51d071b11760bb
parent 161856 1ff9afcf5bec67d4cfd63676a9995a776cd3c9a9
child 161858 50ba1a4576ae087825725d970c7638d759ec007d
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)
bugs918350
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 918350 - SpiderMonkey: Fix a compile error on Windows too.
js/src/frontend/FoldConstants.cpp
--- a/js/src/frontend/FoldConstants.cpp
+++ b/js/src/frontend/FoldConstants.cpp
@@ -19,16 +19,17 @@
 
 using namespace js;
 using namespace js::frontend;
 
 using mozilla::IsNaN;
 using mozilla::IsNegative;
 using mozilla::NegativeInfinity;
 using mozilla::PositiveInfinity;
+using JS::GenericNaN;
 
 static ParseNode *
 ContainsVarOrConst(ParseNode *pn)
 {
     if (!pn)
         return NULL;
     if (pn->isKind(PNK_VAR) || pn->isKind(PNK_CONST))
         return pn;
@@ -148,29 +149,29 @@ FoldBinaryNumeric(ExclusiveContext *cx, 
         if (d2 == 0) {
 #if defined(XP_WIN)
             /* XXX MSVC miscompiles such that (NaN == 0) */
             if (IsNaN(d2))
                 d = GenericNaN();
             else
 #endif
             if (d == 0 || IsNaN(d))
-                d = JS::GenericNaN();
+                d = GenericNaN();
             else if (IsNegative(d) != IsNegative(d2))
                 d = NegativeInfinity();
             else
                 d = PositiveInfinity();
         } else {
             d /= d2;
         }
         break;
 
       case JSOP_MOD:
         if (d2 == 0) {
-            d = JS::GenericNaN();
+            d = GenericNaN();
         } else {
             d = js_fmod(d, d2);
         }
         break;
 
       default:;
     }