Bug 428128 - Removal of legacy JSLL_ routines, r=brendan, a=mtschrep
authorcrowder@fiverocks.com
Fri, 25 Apr 2008 11:40:05 -0700
changeset 14691 35b53832a52998d5aed1cee9278e05cda808ae46
parent 14690 83e4c4f36bb3a3a6d7a4f44f69613f226c7de69c
child 14692 d9eef5ca9ae5d02f52257bad5d72a766fd9fc174
push idunknown
push userunknown
push dateunknown
reviewersbrendan, mtschrep
bugs428128
milestone1.9pre
Bug 428128 - Removal of legacy JSLL_ routines, r=brendan, a=mtschrep
js/jsd/jsd_step.c
js/src/jslong.c
js/src/jslong.h
js/src/prmjtime.c
--- a/js/jsd/jsd_step.c
+++ b/js/jsd/jsd_step.c
@@ -171,20 +171,20 @@ JSBool
                                 } else {
                                     JSLL_SUB(ll_delta, now, jsdc->lastReturnTime);
                                 }
                                 JSLL_ADD(callerpdata->runningTime, callerpdata->runningTime, ll_delta);
                             }
                             /* We're the new current function, and no return
                              * has happened yet. */
                             jsdc->callingFunctionPData = pdata;
-                            jsdc->lastReturnTime = JSLL_ZERO;
+                            jsdc->lastReturnTime = 0;
                             /* This function has no running time (just been
                              * called!), and we'll need the call start time. */
-                            pdata->runningTime = JSLL_ZERO;
+                            pdata->runningTime = 0;
                             pdata->lastCallStart = now;
                         } else {
                             if (++pdata->recurseDepth > pdata->maxRecurseDepth)
                                 pdata->maxRecurseDepth = pdata->recurseDepth;
                         }
                         /* make sure we're called for the return too. */
                         hookresult = JS_TRUE;
                     } else if (!pdata->recurseDepth &&
@@ -233,17 +233,17 @@ JSBool
                         
                         /* Current function is now our caller. */
                         jsdc->callingFunctionPData = pdata->caller;
                         /* No hanging pointers, please. */
                         pdata->caller = NULL;
                         /* Mark the time we returned, and indicate this
                          * function is no longer running. */
                         jsdc->lastReturnTime = now;
-                        pdata->lastCallStart = JSLL_ZERO;
+                        pdata->lastCallStart = 0;
                         ++pdata->callCount;
                     } else if (pdata->recurseDepth) {
                         --pdata->recurseDepth;
                         ++pdata->callCount;
                     }
                 }
                 if (hook)
                     jsd_CallCallHook (jsdc, cx, type, hook, hookData);
--- a/js/src/jslong.c
+++ b/js/src/jslong.c
@@ -35,33 +35,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "jsstddef.h"
 #include "jstypes.h"
 #include "jslong.h"
 
-static JSInt64 ll_zero = JSLL_INIT( 0x00000000,0x00000000 );
-static JSInt64 ll_maxint = JSLL_INIT( 0x7fffffff, 0xffffffff );
-static JSInt64 ll_minint = JSLL_INIT( 0x80000000, 0x00000000 );
-
-#ifdef HAVE_WATCOM_BUG_2
-JSInt64 __pascal __loadds __export
-    JSLL_Zero(void) { return ll_zero; }
-JSInt64 __pascal __loadds __export
-    JSLL_MaxInt(void) { return ll_maxint; }
-JSInt64 __pascal __loadds __export
-    JSLL_MinInt(void) { return ll_minint; }
-#else
-JS_PUBLIC_API(JSInt64) JSLL_Zero(void) { return ll_zero; }
-JS_PUBLIC_API(JSInt64) JSLL_MaxInt(void) { return ll_maxint; }
-JS_PUBLIC_API(JSInt64) JSLL_MinInt(void) { return ll_minint; }
-#endif
-
 #ifndef JS_HAVE_LONG_LONG
 /*
 ** Divide 64-bit a by 32-bit b, which must be normalized so its high bit is 1.
 */
 static void norm_udivmod32(JSUint32 *qp, JSUint32 *rp, JSUint64 a, JSUint32 b)
 {
     JSUint32 d1, d0, q1, q0;
     JSUint32 r1, r0, m;
--- a/js/src/jslong.h
+++ b/js/src/jslong.h
@@ -46,41 +46,16 @@
 **/
 #ifndef jslong_h___
 #define jslong_h___
 
 #include "jstypes.h"
 
 JS_BEGIN_EXTERN_C
 
-/***********************************************************************
-** DEFINES:     JSLL_MaxInt
-**              JSLL_MinInt
-**              JSLL_Zero
-** DESCRIPTION:
-**      Various interesting constants and static variable
-**      initializer
-***********************************************************************/
-#ifdef HAVE_WATCOM_BUG_2
-JSInt64 __pascal __loadds __export
-    JSLL_MaxInt(void);
-JSInt64 __pascal __loadds __export
-    JSLL_MinInt(void);
-JSInt64 __pascal __loadds __export
-    JSLL_Zero(void);
-#else
-extern JS_PUBLIC_API(JSInt64) JSLL_MaxInt(void);
-extern JS_PUBLIC_API(JSInt64) JSLL_MinInt(void);
-extern JS_PUBLIC_API(JSInt64) JSLL_Zero(void);
-#endif
-
-#define JSLL_MAXINT   JSLL_MaxInt()
-#define JSLL_MININT   JSLL_MinInt()
-#define JSLL_ZERO     JSLL_Zero()
-
 #ifdef JS_HAVE_LONG_LONG
 
 #if JS_BYTES_PER_LONG == 8
 #define JSLL_INIT(hi, lo)  ((hi ## L << 32) + lo ## L)
 #elif (defined(WIN32) || defined(WIN16)) && !defined(__GNUC__)
 #define JSLL_INIT(hi, lo)  ((hi ## i64 << 32) + lo ## i64)
 #else
 #define JSLL_INIT(hi, lo)  ((hi ## LL << 32) + lo ## LL)
--- a/js/src/prmjtime.c
+++ b/js/src/prmjtime.c
@@ -532,17 +532,17 @@ PRMJ_DSTOffset(JSInt64 local_time)
         /*go ahead a day to make localtime work (does not work with 0) */
         JSLL_UI2L(local_time,PRMJ_DAY_SECONDS);
     }
     JSLL_L2UI(local,local_time);
     PRMJ_basetime(local_time,&prtm);
 #ifndef HAVE_LOCALTIME_R
     ptm = localtime(&local);
     if(!ptm){
-        return JSLL_ZERO;
+        return 0;
     }
     tm = *ptm;
 #else
     localtime_r(&local,&tm); /* get dst information */
 #endif
 
     diff = ((tm.tm_hour - prtm.tm_hour) * PRMJ_HOUR_SECONDS) +
 	((tm.tm_min - prtm.tm_min) * 60);