Bug 1111244 - Remove some code specific to old unsupported MSVC versions from js/src; r=Waldo
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 02 Jan 2015 17:32:43 -0500
changeset 247748 fe2187ec388c581d0ed6dc1db77d096d1263227e
parent 247747 039ae5be340aaef5841b66424ac8d922c9643058
child 247749 b9458d466161337046f71d4b6687a8fd47643736
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1111244
milestone37.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 1111244 - Remove some code specific to old unsupported MSVC versions from js/src; r=Waldo
js/src/jstypes.h
js/src/prmjtime.cpp
js/src/vm/NativeObject.cpp
--- a/js/src/jstypes.h
+++ b/js/src/jstypes.h
@@ -99,17 +99,17 @@
 ** MACROS:      JS_BEGIN_MACRO
 **              JS_END_MACRO
 ** DESCRIPTION:
 **      Macro body brackets so that macros with compound statement definitions
 **      behave syntactically more like functions when called.
 ***********************************************************************/
 #define JS_BEGIN_MACRO  do {
 
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#if defined(_MSC_VER)
 # define JS_END_MACRO                                                         \
     } __pragma(warning(push)) __pragma(warning(disable:4127))                 \
     while (0) __pragma(warning(pop))
 #else
 # define JS_END_MACRO   } while (0)
 #endif
 
 /***********************************************************************
--- a/js/src/prmjtime.cpp
+++ b/js/src/prmjtime.cpp
@@ -18,27 +18,19 @@
 #include <time.h>
 
 #include "jstypes.h"
 #include "jsutil.h"
 
 #ifdef XP_WIN
 #include <windef.h>
 #include <winbase.h>
-/* VC++ 8.0 or later */
-#if _MSC_VER >= 1400
-#define NS_HAVE_INVALID_PARAMETER_HANDLER 1
-#endif
-#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
 #include <crtdbg.h>   /* for _CrtSetReportMode */
-#endif
 #include <mmsystem.h> /* for timeBegin/EndPeriod */
-#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
 #include <stdlib.h>   /* for _set_invalid_parameter_handler */
-#endif
 
 #include "prinit.h"
 
 #endif
 
 #ifdef XP_UNIX
 
 #ifdef _SVID_GETTOD   /* Defined only on Solaris, see Solaris <sys/types.h> */
@@ -250,17 +242,17 @@ PRMJ_Now()
         // cannot maintain the invariant that Date.now() never
         // decreases; the old implementation has this behavior as
         // well.
         needsCalibration = true;
     }
 }
 #endif
 
-#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
+#ifdef XP_WIN
 static void
 PRMJ_InvalidParameterHandler(const wchar_t *expression,
                              const wchar_t *function,
                              const wchar_t *file,
                              unsigned int   line,
                              uintptr_t      pReserved)
 {
     /* empty */
@@ -270,17 +262,17 @@ PRMJ_InvalidParameterHandler(const wchar
 /* Format a time value into a buffer. Same semantics as strftime() */
 size_t
 PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *prtm)
 {
     size_t result = 0;
 #if defined(XP_UNIX) || defined(XP_WIN)
     struct tm a;
     int fake_tm_year = 0;
-#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
+#ifdef XP_WIN
     _invalid_parameter_handler oldHandler;
     int oldReportMode;
 #endif
 
     memset(&a, 0, sizeof(struct tm));
 
     a.tm_sec = prtm->tm_sec;
     a.tm_min = prtm->tm_min;
@@ -344,24 +336,24 @@ PRMJ_FormatTime(char *buf, int buflen, c
 
     /*
      * Even with the above, SunOS 4 seems to detonate if tm_zone and tm_gmtoff
      * are null.  This doesn't quite work, though - the timezone is off by
      * tzoff + dst.  (And mktime seems to return -1 for the exact dst
      * changeover time.)
      */
 
-#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
+#ifdef XP_WIN
     oldHandler = _set_invalid_parameter_handler(PRMJ_InvalidParameterHandler);
     oldReportMode = _CrtSetReportMode(_CRT_ASSERT, 0);
 #endif
 
     result = strftime(buf, buflen, fmt, &a);
 
-#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
+#ifdef XP_WIN
     _set_invalid_parameter_handler(oldHandler);
     _CrtSetReportMode(_CRT_ASSERT, oldReportMode);
 #endif
 
     if (fake_tm_year && result) {
         char real_year[16];
         char fake_year[16];
         size_t real_year_len;
--- a/js/src/vm/NativeObject.cpp
+++ b/js/src/vm/NativeObject.cpp
@@ -263,17 +263,17 @@ js::NativeObject::slotInRange(uint32_t s
 {
     uint32_t capacity = numFixedSlots() + numDynamicSlots();
     if (sentinel == SENTINEL_ALLOWED)
         return slot <= capacity;
     return slot < capacity;
 }
 #endif /* DEBUG */
 
-#if defined(_MSC_VER) && _MSC_VER >= 1500
+#if defined(_MSC_VER)
 /*
  * Work around a compiler bug in MSVC9 and above, where inlining this function
  * causes stack pointer offsets to go awry and spp to refer to something higher
  * up the stack.
  */
 MOZ_NEVER_INLINE
 #endif
 Shape *