Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jul 2008 16:59:24 GMT
From:      Dan Rench <citric@cubicone.tmetic.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/125191: update lang/spidermonkey to javascript 1.7
Message-ID:  <200807021659.m62GxOdL006127@www.freebsd.org>
Resent-Message-ID: <200807021700.m62H0BXS064544@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         125191
>Category:       ports
>Synopsis:       update lang/spidermonkey to javascript 1.7
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 02 17:00:11 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dan Rench
>Release:        6.3-RELEASE-p2
>Organization:
>Environment:
FreeBSD motorhead.i.dren.ch 6.3-RELEASE-p2 FreeBSD 6.3-RELEASE-p2 #0: Wed Apr 23 13:08:56 CDT 2008     root@motorhead.i.dren.ch:/usr/obj/usr/src/sys/SMP  i386
>Description:
Updates the port to Javascript 1.7. Much thanks to 
Bernhard Fröhlich for doing the heavy lifting.
>How-To-Repeat:
n/a
>Fix:


Patch attached with submission follows:

diff -ruN spidermonkey.old/Makefile spidermonkey/Makefile
--- spidermonkey.old/Makefile	2008-01-01 14:05:58.000000000 -0600
+++ spidermonkey/Makefile	2008-07-02 11:30:50.000000000 -0500
@@ -5,13 +5,14 @@
 # $FreeBSD: ports/lang/spidermonkey/Makefile,v 1.22 2007/10/04 01:25:18 edwin Exp $
 
 PORTNAME=	spidermonkey
-DISTVERSION=	1.5
-PORTREVISION=	3
+DISTVERSION=	1.7.0
 CATEGORIES=	lang
-MASTER_SITES=	MOZILLA
-MASTER_SITE_SUBDIR=	js/older-packages/
+MASTER_SITES=	http://ftp.mozilla.org/pub/mozilla.org/js/ \
+		http://ftp.belnet.be/mirrors/ftp.mozilla.org/js/ \
+		http://gentoo.netnitco.net/distfiles/ \
+		http://gd.tuwien.ac.at/opsys/linux/gentoo/distfiles/ \
+		ftp://ftp.mozilla.org/pub/mozilla.org/js/
 DISTNAME=	js-${DISTVERSION}
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:src
 
 MAINTAINER=	citric@cubicone.tmetic.com
 COMMENT=	A standalone JavaScript interpreter from the Mozilla project
@@ -24,27 +25,6 @@
 		PROG_LIBS="-lreadline -ltermcap -lm ${PTHREAD_LIBS}" \
 		LDFLAGS="-L${LOCALBASE}/lib"
 CFLAGS+=	-I${LOCALBASE}/include/nspr
-.if defined(WITH_TEST)
-USE_PERL5_BUILD=test harness
-PATCHFILES=	spidermonkey-patch-tests-ecma.bz2	\
-		spidermonkey-patch-tests-timezone.bz2	\
-		spidermonkey-patch-tests-js.bz2
-PATCH_SITES=	http://virtual-estates.net/~mi/port-stuff/
-BUILD_DEPENDS+=	${SITE_PERL}/Getopt/Mixed.pm:${PORTSDIR}/devel/p5-Getopt-Mixed
-
-DISTFILES+=	js-tests-20021118${EXTRACT_SUFX}:older
-post-build:	test
-post-patch:
-	#
-	# Removing known bad tests:
-	#	https://bugzilla.mozilla.org/show_bug.cgi?id=10278
-	#	https://bugzilla.mozilla.org/show_bug.cgi?id=101964
-	#
-	cd ${WRKDIR}/tests && ${RM} js1_3/regress/function-001-n.js	\
-		js1_2/function/function-001-n.js	\
-		js1_3/Script/function-001-n.js	\
-		js1_5/Array/regress-101964.js
-.endif
 
 USE_GMAKE=	YES
 MAKEFILE=	Makefile.ref
@@ -52,23 +32,13 @@
 MAKE_ENV+=	CC="${CC}" CCC="${CXX}"
 USE_LDCONFIG=	yes
 SRC_DIR=	js/src
-JSH=		jsapi.h jsautocfg.h jscompat.h jslong.h jsosdep.h jsotypes.h jspubtd.h jstypes.h \
-		jsstr.h jshash.h jsprvtd.h
+JSH=		jsapi.h jsautocfg.h jsconfig.h jscompat.h jslong.h jsosdep.h \
+		jsotypes.h jspubtd.h jstypes.h jsstr.h jshash.h jsprvtd.h \
+		jsproto.tbl
 PLIST_FILES=	bin/js lib/libjs.so lib/libjs.so.1 ${JSH:S,^,include/,}
-WRKSRC=	${WRKDIR}/${SRC_DIR}
+WRKSRC=		${WRKDIR}/${SRC_DIR}
 EXTRACT_AFTER_ARGS=| ${TAR} -xf - \
-		--exclude js/jsd	\
-		--exclude ${SRC_DIR}/editline	\
-		--exclude ${SRC_DIR}/fdlibm	\
-		--exclude ${SRC_DIR}/liveconnect	\
-		--exclude ${SRC_DIR}/perlconnect
-
-test:
-	cd ${WRKDIR}/tests && ${SETENV}	\
-	    LD_LIBRARY_PATH=${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ	\
-		${PERL5} jsDriver.pl	\
-		    --shellpath ${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ/js \
-		    --engine smdebug --confail --trace --list ecma* js1_*
+		--exclude js/jsd
 
 do-configure:
 	${CP} ${WRKSRC}/config/Linux_All.mk \
diff -ruN spidermonkey.old/distinfo spidermonkey/distinfo
--- spidermonkey.old/distinfo	2006-01-10 17:36:54.000000000 -0600
+++ spidermonkey/distinfo	2008-06-19 11:06:21.000000000 -0500
@@ -1,15 +1,3 @@
-MD5 (js-1.5.tar.gz) = 863bb6462f4ce535399a7c6276ae6776
-SHA256 (js-1.5.tar.gz) = ef72a154320c9949f8de0732e8dbfa186b83feb0a5e890d90807757de9998585
-SIZE (js-1.5.tar.gz) = 958135
-MD5 (js-tests-20021118.tar.gz) = df89464084e583a075a782ad66da5370
-SHA256 (js-tests-20021118.tar.gz) = 75878c90ed8641aaddcf4cb0b277353c6e7be31e6539beffa44f33bdfe69181f
-SIZE (js-tests-20021118.tar.gz) = 803198
-MD5 (spidermonkey-patch-tests-ecma.bz2) = 73ec1e37821deff69e68eac2192a2cd2
-SHA256 (spidermonkey-patch-tests-ecma.bz2) = 9f6ef721145e12bfca1a8ecdd0e8692fc916fef792927d9503bd40bb86f15f21
-SIZE (spidermonkey-patch-tests-ecma.bz2) = 5702
-MD5 (spidermonkey-patch-tests-timezone.bz2) = 9b392c970d878f3defcd7e3e7ddeb0b5
-SHA256 (spidermonkey-patch-tests-timezone.bz2) = 94322a6541303ac66ffad5cdfdc4af8d5ec14ce74c2dc4709736941abd4bd8bf
-SIZE (spidermonkey-patch-tests-timezone.bz2) = 7658
-MD5 (spidermonkey-patch-tests-js.bz2) = 20770d4e82fff61c1bbb5ff91d2551ec
-SHA256 (spidermonkey-patch-tests-js.bz2) = f930c31005778eeb40f4d3fa10a6d65ab2991c95c990c60712f9d2696c041088
-SIZE (spidermonkey-patch-tests-js.bz2) = 3685
+MD5 (js-1.7.0.tar.gz) = 5571134c3863686b623ebe4e6b1f6fe6
+SHA256 (js-1.7.0.tar.gz) = 44363f0f3895800ee6010763eae90c0d15ed28e07d783bc7b3c607ce98d8668b
+SIZE (js-1.7.0.tar.gz) = 1165607
diff -ruN spidermonkey.old/files/patch-Makefile spidermonkey/files/patch-Makefile
--- spidermonkey.old/files/patch-Makefile	1969-12-31 18:00:00.000000000 -0600
+++ spidermonkey/files/patch-Makefile	2008-06-18 10:43:50.000000000 -0500
@@ -0,0 +1,13 @@
+--- Makefile.ref	2006-07-26 21:16:47.000000000 +0200
++++ Makefile.ref	2008-06-18 17:43:04.000000000 +0200
+@@ -335,8 +335,8 @@
+ $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
+ 	link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
+ else
+-$(PROGRAM): $(PROG_OBJS) $(LIBRARY)
+-	$(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
++$(PROGRAM): $(PROG_OBJS) $(SHARED_LIBRARY)
++	$(CC) -o $@ $(CFLAGS) $(PROG_OBJS) -L$(OBJDIR) -ljs $(LDFLAGS) $(OTHER_LIBS) \
+ 	    $(PROG_LIBS)
+ endif
+ 
diff -ruN spidermonkey.old/files/patch-config spidermonkey/files/patch-config
--- spidermonkey.old/files/patch-config	2006-01-08 15:31:22.000000000 -0600
+++ spidermonkey/files/patch-config	2008-06-19 11:13:52.000000000 -0500
@@ -1,47 +1,16 @@
---- Makefile.ref	Fri Nov 14 19:10:55 2003
-+++ Makefile.ref	Sat Aug  6 12:25:36 2005
-@@ -56,6 +56,4 @@
- ifdef USE_MSVC
- OTHER_LIBS += fdlibm/$(OBJDIR)/fdlibm.lib
--else
--OTHER_LIBS += -Lfdlibm/$(OBJDIR) -lfdm
- endif
- 
-@@ -242,10 +240,6 @@
- 	$(NULL)
- 
--PREDIRS	+= fdlibm
--
- ifdef USE_MSVC
- FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/fdlibm.lib
--else
--FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/libfdm.a
- endif
- JSMATH_PRELINK	= $(OBJDIR)/jsmathtemp.o
-@@ -301,6 +295,6 @@
- 	link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
- else
--$(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY)
--	$(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
-+$(PROGRAM): $(PROG_OBJS) $(SHARED_LIBRARY) $(FDLIBM_LIBRARY)
-+	$(CC) -o $@ $(CFLAGS) $(PROG_OBJS) -L$(OBJDIR) -ljs $(LDFLAGS) $(OTHER_LIBS) \
- 	    $(PROG_LIBS)
- endif
---- config/Linux_All.mk.orig	Tue May 10 15:53:44 2005
-+++ config/Linux_All.mk	Sat Dec 10 21:17:45 2005
-@@ -41,9 +41,9 @@
+--- config/Linux_All.mk	2005-05-10 21:53:44.000000000 +0200
++++ config/Linux_All.mk	2008-06-18 14:26:06.000000000 +0200
+@@ -41,8 +41,8 @@
  # Config for all versions of Linux
  #
  
 -CC = gcc
 -CCC = g++
--CFLAGS +=  -Wall -Wno-format
 +CC ?= gcc
 +CCC ?= g++
-+CFLAGS +=  -Wall -Werror	# XXX do these work with non-gcc and non-icc?
+ CFLAGS +=  -Wall -Wno-format
  OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R
  
- RANLIB = echo
 @@ -74,7 +74,7 @@
  
  GFX_ARCH = x
@@ -72,12 +41,3 @@
 +else
 +OS_CFLAGS += -DPIC -fpic
  endif
---- rules.mk	Fri Nov 14 19:11:04 2003
-+++ rules.mk	Mon Aug  8 14:40:36 2005
-@@ -59,5 +59,5 @@
- TARGETS += $(SHARED_LIBRARY) $(PROGRAM)  # it is now
- else
--TARGETS += $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) 
-+TARGETS += $(SHARED_LIBRARY) $(PROGRAM) 
- endif
- 
diff -ruN spidermonkey.old/files/patch-jscntxt.c spidermonkey/files/patch-jscntxt.c
--- spidermonkey.old/files/patch-jscntxt.c	2006-01-29 12:05:55.000000000 -0600
+++ spidermonkey/files/patch-jscntxt.c	1969-12-31 18:00:00.000000000 -0600
@@ -1,11 +0,0 @@
---- jscntxt.c.orig	Sat Jan 14 01:57:13 2006
-+++ jscntxt.c	Sat Jan 14 02:14:51 2006
-@@ -334,7 +334,7 @@
- {
-     const JSResolvingKey *key = (const JSResolvingKey *)ptr;
- 
--    return ((JSDHashNumber)key->obj >> JSVAL_TAGBITS) ^ key->id;
-+    return ((JSDHashNumber)JS_PTR_TO_UINT32(key->obj) >> JSVAL_TAGBITS) ^ key->id;
- }
- 
- JS_PUBLIC_API(JSBool)
diff -ruN spidermonkey.old/files/patch-jslock.c spidermonkey/files/patch-jslock.c
--- spidermonkey.old/files/patch-jslock.c	2006-01-29 12:05:55.000000000 -0600
+++ spidermonkey/files/patch-jslock.c	2008-06-20 13:22:13.000000000 -0500
@@ -1,6 +1,6 @@
---- jslock.c.orig	Sat Jan 14 02:20:18 2006
-+++ jslock.c	Sat Jan 14 02:22:17 2006
-@@ -193,7 +193,9 @@
+--- jslock.c	2007-03-29 23:55:35.000000000 +0200
++++ jslock.c	2008-06-19 16:08:19.000000000 +0200
+@@ -224,7 +224,9 @@
  #endif
  }
  
@@ -9,3 +9,4 @@
 +#endif
  
  #ifdef DEBUG_SCOPE_COUNT
+ 
diff -ruN spidermonkey.old/files/patch-jsopcode.c spidermonkey/files/patch-jsopcode.c
--- spidermonkey.old/files/patch-jsopcode.c	2006-01-29 12:05:55.000000000 -0600
+++ spidermonkey/files/patch-jsopcode.c	2008-06-20 13:22:13.000000000 -0500
@@ -1,6 +1,6 @@
---- jsopcode.c.orig	Sun Aug 29 18:00:24 2004
-+++ jsopcode.c	Sat Jan 14 02:26:07 2006
-@@ -239,7 +239,7 @@
+--- jsopcode.c	2007-09-27 20:30:18.000000000 +0200
++++ jsopcode.c	2008-06-19 16:10:44.000000000 +0200
+@@ -262,7 +262,7 @@
          pc2 += jmplen;
          npairs = GET_ATOM_INDEX(pc2);
          pc2 += ATOM_INDEX_LEN;
diff -ruN spidermonkey.old/files/patch-jsosdep.h spidermonkey/files/patch-jsosdep.h
--- spidermonkey.old/files/patch-jsosdep.h	1969-12-31 18:00:00.000000000 -0600
+++ spidermonkey/files/patch-jsosdep.h	2008-06-20 13:22:13.000000000 -0500
@@ -0,0 +1,11 @@
+--- jsosdep.h	2006-07-07 04:12:02.000000000 +0200
++++ jsosdep.h	2008-06-19 16:32:12.000000000 +0200
+@@ -89,7 +89,7 @@
+ #elif defined(SOLARIS)
+ #define JS_HAVE_LONG_LONG
+ 
+-#elif defined(FREEBSD)
++#elif defined(FREEBSD) || defined(__FreeBSD__)
+ #define JS_HAVE_LONG_LONG
+ 
+ #elif defined(SUNOS4)
diff -ruN spidermonkey.old/files/patch-jsstr.c spidermonkey/files/patch-jsstr.c
--- spidermonkey.old/files/patch-jsstr.c	2007-06-04 06:59:05.000000000 -0500
+++ spidermonkey/files/patch-jsstr.c	2008-06-20 13:22:13.000000000 -0500
@@ -1,19 +1,11 @@
-
-
---- patch-jsstr.c begins here ---
---- jsstr.c.orig	Mon Dec 22 01:13:07 2003
-+++ jsstr.c	Mon May 28 10:46:21 2007
-@@ -1830,6 +1830,8 @@
-     jsdouble d;
+--- jsstr.c	2006-11-22 09:28:44.000000000 +0100
++++ jsstr.c	2008-06-19 16:14:49.000000000 +0200
+@@ -1815,6 +1815,8 @@
      jsint i, j;
      uint32 len, limit;
-+    
-+    bzero(&tmp,sizeof(tmp));
  
++    bzero(&tmp,sizeof(tmp));
++
      str = js_ValueToString(cx, OBJECT_TO_JSVAL(obj));
      if (!str)
-
---- patch-jsstr.c ends here ---
-
-
-
+         return JS_FALSE;
diff -ruN spidermonkey.old/files/patch-jstypes.h spidermonkey/files/patch-jstypes.h
--- spidermonkey.old/files/patch-jstypes.h	2006-01-29 12:05:55.000000000 -0600
+++ spidermonkey/files/patch-jstypes.h	1969-12-31 18:00:00.000000000 -0600
@@ -1,22 +0,0 @@
---- jstypes.h.orig	Sat Nov 15 00:11:04 2003
-+++ jstypes.h	Sat Jan 14 02:17:40 2006
-@@ -203,6 +203,19 @@
- #define JS_BITMASK(n)   (JS_BIT(n) - 1)
- 
- /***********************************************************************
-+** MACROS:      JS_PTR_TO_INT32
-+**              JS_PTR_TO_UINT32
-+**              JS_INT32_TO_PTR
-+**              JS_UINT32_TO_PTR
-+** DESCRIPTION:
-+** Integer to pointer and pointer to integer conversion macros.
-+***********************************************************************/
-+#define JS_PTR_TO_INT32(x)  ((jsint)((char *)(x) - (char *)0))
-+#define JS_PTR_TO_UINT32(x) ((jsuint)((char *)(x) - (char *)0))
-+#define JS_INT32_TO_PTR(x)  ((void *)((char *)0 + (jsint)(x)))
-+#define JS_UINT32_TO_PTR(x) ((void *)((char *)0 + (jsuint)(x)))
-+
-+/***********************************************************************
- ** MACROS:      JS_HOWMANY
- **              JS_ROUNDUP
- **              JS_MIN
diff -ruN spidermonkey.old/files/patch-warnings spidermonkey/files/patch-warnings
--- spidermonkey.old/files/patch-warnings	2006-01-08 15:31:22.000000000 -0600
+++ spidermonkey/files/patch-warnings	2008-06-20 13:22:13.000000000 -0500
@@ -1,312 +1,39 @@
---- jspubtd.h	Thu Apr  7 15:54:07 2005
-+++ jspubtd.h	Thu Aug  4 23:52:12 2005
-@@ -517,5 +517,5 @@
- (* JS_DLL_CALLBACK JSArgumentFormatter)(JSContext *cx, const char *format,
-                                         JSBool fromJS, jsval **vpp,
--                                        va_list *app);
-+                                        va_list app);
- #endif
- 
---- jsdhash.c	Wed Jan 14 21:00:53 2004
-+++ jsdhash.c	Fri Aug  5 00:15:04 2005
-@@ -92,5 +92,5 @@
- JS_DHashVoidPtrKeyStub(JSDHashTable *table, const void *key)
- {
--    return (JSDHashNumber)key >> 2;
-+    return (JSDHashNumber)(uintptr_t)key >> 2;
- }
- 
---- jsstr.c	Fri Jun  3 15:07:49 2005
-+++ jsstr.c	Fri Aug  5 01:31:08 2005
-@@ -2596,5 +2596,5 @@
- js_hash_string_pointer(const void *key)
- {
--    return (JSHashNumber)key >> JSVAL_TAGBITS;
-+    return (JSHashNumber)(uintptr_t)key >> JSVAL_TAGBITS;
- }
- 
---- jsobj.h	Wed Sep  1 17:33:16 2004
-+++ jsobj.h	Fri Aug  5 01:16:56 2005
-@@ -238,12 +238,12 @@
- };
- 
--#define SHARP_BIT       ((jsatomid) 1)
--#define BUSY_BIT        ((jsatomid) 2)
-+#define SHARP_BIT       ((uintptr_t) 1)
-+#define BUSY_BIT        ((uintptr_t) 2)
- #define SHARP_ID_SHIFT  2
--#define IS_SHARP(he)    ((jsatomid)(he)->value & SHARP_BIT)
--#define MAKE_SHARP(he)  ((he)->value = (void*)((jsatomid)(he)->value|SHARP_BIT))
--#define IS_BUSY(he)     ((jsatomid)(he)->value & BUSY_BIT)
--#define MAKE_BUSY(he)   ((he)->value = (void*)((jsatomid)(he)->value|BUSY_BIT))
--#define CLEAR_BUSY(he)  ((he)->value = (void*)((jsatomid)(he)->value&~BUSY_BIT))
-+#define IS_SHARP(he)    ((uintptr_t)(he)->value & SHARP_BIT)
-+#define MAKE_SHARP(he)  ((he)->value = (void*)((uintptr_t)(he)->value|SHARP_BIT))
-+#define IS_BUSY(he)     ((uintptr_t)(he)->value & BUSY_BIT)
-+#define MAKE_BUSY(he)   ((he)->value = (void*)((uintptr_t)(he)->value|BUSY_BIT))
-+#define CLEAR_BUSY(he)  ((he)->value = (void*)((uintptr_t)(he)->value&~BUSY_BIT))
- 
- extern JSHashEntry *
---- jstypes.h	Fri Nov 14 19:11:04 2003
-+++ jstypes.h	Thu Aug  4 23:54:13 2005
-@@ -378,6 +378,7 @@
- ** A JSWord is an integer that is the same size as a void*
- */
-+#include <inttypes.h>
--typedef long JSWord;
--typedef unsigned long JSUword;
-+typedef intptr_t JSWord;
-+typedef uintptr_t JSUword;
- 
- #include "jsotypes.h"
---- jsosdep.h	Fri Nov 14 19:10:59 2003
-+++ jsosdep.h	Fri Aug  5 00:50:44 2005
-@@ -102,5 +102,5 @@
- #define JS_HAVE_LONG_LONG
- 
--#elif defined(FREEBSD)
-+#elif defined(FREEBSD) || defined(__FreeBSD__)
- #define JS_HAVE_LONG_LONG
- 
---- jsdtoa.c	Sat Apr  3 17:11:11 2004
-+++ jsdtoa.c	Fri Aug  5 00:28:15 2005
-@@ -258,5 +258,5 @@
+--- jsdtoa.c	2007-01-18 00:56:12.000000000 +0100
++++ jsdtoa.c	2008-06-19 16:34:02.000000000 +0200
+@@ -247,7 +247,8 @@
+ #define word1(x)        JSDOUBLE_LO32(x)
  #define set_word1(x, y) JSDOUBLE_SET_LO32(x, y)
  
 -#define Storeinc(a,b,c) (*(a)++ = (b) << 16 | (c) & 0xffff)
 +#define Storeinc(a,b,c) (*(a)++ = (b) << 16 | ((c) & 0xffff))
++
  
  /* #define P DBL_MANT_DIG */
-@@ -990,5 +990,6 @@
- {
-     register Long L;
--    double a;
-+    double a = 0.;	/* only need to initialize to calm the compiler.
-+			 * set_word0 and set_word1 set a, but in two stages */
- 
-     L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
-@@ -1021,5 +1022,5 @@
-     ULong *xa, *xa0, w, y, z;
-     int32 k;
--    double d;
-+    double d = 0.;
- #define d0 word0(d)
- #define d1 word1(d)
-@@ -1837,4 +1838,5 @@
- #ifdef Avoid_Underflow
-     if (scale) {
-+        rv0 = 0.; /* calm the compiler warning */
-         set_word0(rv0, Exp_1 - P*Exp_msk1);
-         set_word1(rv0, 0);
---- jsatom.h	Wed Feb 11 02:21:59 2004
-+++ jsatom.h	Fri Aug  5 01:21:44 2005
-@@ -96,5 +96,5 @@
- 
- #define ALE_ATOM(ale)   ((JSAtom *) (ale)->entry.key)
--#define ALE_INDEX(ale)  ((jsatomid) (ale)->entry.value)
-+#define ALE_INDEX(ale)  ((jsatomid)(uintptr_t)(ale)->entry.value)
- #define ALE_JSOP(ale)   ((JSOp) (ale)->entry.value)
- #define ALE_VALUE(ale)  ((jsval) (ale)->entry.value)
---- jsatom.c	Tue Jul  6 03:49:18 2004
-+++ jsatom.c	Fri Aug  5 01:23:29 2005
-@@ -137,5 +137,5 @@
- #endif
- 
--#define HASH_OBJECT(o)  ((JSHashNumber)(o) >> JSVAL_TAGBITS)
-+#define HASH_OBJECT(o)  ((JSHashNumber)(uintptr_t)(o) >> JSVAL_TAGBITS)
- #define HASH_INT(i)     ((JSHashNumber)(i))
- #define HASH_DOUBLE(dp) ((JSHashNumber)(JSDOUBLE_HI32(*dp) ^ JSDOUBLE_LO32(*dp)))
-@@ -834,5 +834,5 @@
-         }
- 
--        ALE_SET_INDEX(ale, al->count++);
-+        ALE_SET_INDEX(ale, (intptr_t)al->count++);
-     }
-     return ale;
---- jsscript.c	Fri Jul  8 21:48:08 2005
-+++ jsscript.c	Fri Aug  5 01:29:26 2005
-@@ -322,5 +322,5 @@
-     if (!JS_XDRUint32(xdr, &index))
-         return JS_FALSE;
--    ALE_SET_INDEX(ale, index);
-+    ALE_SET_INDEX(ale, (uintptr_t)index);
- 
-     if (!JS_XDRValue(xdr, &value))
-@@ -338,5 +338,5 @@
- {
-     uint32 length;
--    uintN i;
-+    uintptr_t i;
-     JSBool ok;
- 
---- jsinterp.c	Fri Jun  4 21:39:32 2004
-+++ jsinterp.c	Sat Aug  6 18:56:29 2005
-@@ -1382,9 +1382,9 @@
-     jsbytecode *pc, *pc2, *endpc;
-     JSOp op, op2;
--    const JSCodeSpec *cs;
-+    const JSCodeSpec *cs = NULL;
-     JSAtom *atom;
-     uintN argc, slot, attrs;
-     jsval *vp, lval, rval, ltmp, rtmp;
--    jsid id;
-+    jsid id = -1L; /* initialize to something awful */
-     JSObject *withobj, *origobj, *propobj;
-     jsval iter_state;
-@@ -1398,5 +1398,5 @@
-     JSType type;
- #ifdef DEBUG
--    FILE *tracefp;
-+    FILE *tracefp = NULL;
+ /* Ten_pmax = floor(P*log(2)/log(5)) */
+--- jspubtd.h	2007-06-23 01:13:21.000000000 +0200
++++ jspubtd.h	2008-06-19 16:26:08.000000000 +0200
+@@ -616,7 +616,7 @@
+ typedef JSBool
+ (* JS_DLL_CALLBACK JSArgumentFormatter)(JSContext *cx, const char *format,
+                                         JSBool fromJS, jsval **vpp,
+-                                        va_list *app);
++                                        va_list app);
  #endif
- #if JS_HAS_EXPORT_IMPORT
-@@ -1475,4 +1475,5 @@
-         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_OVER_RECURSED);
-         ok = JS_FALSE;
-+        sp = NULL;
-         goto out;
-     }
-@@ -1484,4 +1485,5 @@
-     if (!newsp) {
-         ok = JS_FALSE;
-+        sp = NULL;
-         goto out;
-     }
-@@ -1517,5 +1519,5 @@
-                     }
-                 }
--                fprintf(tracefp, " @ %d\n", sp - fp->spbase);
-+                fprintf(tracefp, " @ %td\n", sp - fp->spbase);
-             }
-         }
-@@ -4209,5 +4211,5 @@
-                     }
-                 }
--                fprintf(tracefp, " @ %d\n", sp - fp->spbase);
-+                fprintf(tracefp, " @ %td\n", sp - fp->spbase);
-             }
-             fprintf(tracefp, "  stack: ");
---- jsobj.c	Wed Jun  2 17:20:56 2004
-+++ jsobj.c	Sat Aug  6 19:08:39 2005
-@@ -378,5 +378,5 @@
- js_hash_object(const void *key)
- {
--    return (JSHashNumber)key >> JSVAL_TAGBITS;
-+    return (JSHashNumber)(uintptr_t)key >> JSVAL_TAGBITS;
- }
  
-@@ -407,5 +407,5 @@
-     if (!he) {
-         sharpid = 0;
--        he = JS_HashTableRawAdd(table, hep, hash, obj, (void *)sharpid);
-+        he = JS_HashTableRawAdd(table, hep, hash, obj, (void *)(uintptr_t)sharpid);
-         if (!he) {
-             JS_ReportOutOfMemory(cx);
-@@ -461,8 +461,8 @@
-             return NULL;
-     } else {
--        sharpid = (jsatomid) he->value;
-+        sharpid = (jsatomid)(uintptr_t)he->value;
-         if (sharpid == 0) {
-             sharpid = ++map->sharpgen << SHARP_ID_SHIFT;
--            he->value = (void *) sharpid;
-+            he->value = (void *)(uintptr_t)sharpid;
-         }
-         ida = NULL;
-@@ -505,5 +505,5 @@
-         if (!he)
-             goto bad;
--        JS_ASSERT((((jsatomid) he->value) & SHARP_BIT) == 0);
-+        JS_ASSERT((((uintptr_t)he->value) & SHARP_BIT) == 0);
-         if (!idap) {
-             JS_DestroyIdArray(cx, ida);
-@@ -534,5 +534,5 @@
-     }
+ typedef JSBool
+--- jsapi.c	2007-10-03 16:36:48.000000000 +0200
++++ jsapi.c	2008-06-19 17:17:52.000000000 +0200
+@@ -134,7 +134,7 @@
  
--    sharpid = (jsatomid) he->value;
-+    sharpid = (jsatomid)(uintptr_t)he->value;
-     if (sharpid == 0) {
-         *sp = NULL;
---- jsopcode.c	Thu Jun 10 00:33:52 2004
-+++ jsopcode.c	Sat Aug  6 19:13:50 2005
-@@ -181,5 +181,5 @@
-       case JOF_JUMPX:
-         off = GetJumpOffset(pc, pc);
--        fprintf(fp, " %u (%d)", loc + off, off);
-+        fprintf(fp, " %tu (%td)", loc + off, off);
-         break;
- 
-@@ -216,8 +216,8 @@
-         high = GET_JUMP_OFFSET(pc2);
-         pc2 += JUMP_OFFSET_LEN;
--        fprintf(fp, " defaultOffset %d low %d high %d", off, low, high);
-+        fprintf(fp, " defaultOffset %td low %d high %d", off, low, high);
-         for (i = low; i <= high; i++) {
-             off = GetJumpOffset(pc, pc2);
--            fprintf(fp, "\n\t%d: %d", i, off);
-+            fprintf(fp, "\n\t%d: %td", i, off);
-             pc2 += jmplen;
-         }
-@@ -253,5 +253,5 @@
-             if (!cstr)
-                 return 0;
--            fprintf(fp, "\n\t%s: %d", cstr, off);
-+            fprintf(fp, "\n\t%s: %td", cstr, off);
-             JS_free(cx, cstr);
-             npairs--;
---- jsparse.c	Mon Mar 29 22:20:03 2004
-+++ jsparse.c	Sat Aug  6 19:15:27 2005
-@@ -876,5 +876,5 @@
-                 return NULL;
-         }
--        ALE_SET_JSOP(ale, tc->topStmt ? JSOP_CLOSURE : JSOP_DEFFUN);
-+        ALE_SET_JSOP(ale, (uintptr_t)(tc->topStmt ? JSOP_CLOSURE : JSOP_DEFFUN));
- 
- #if JS_HAS_LEXICAL_CLOSURE
---- jsprf.c	Wed Feb 25 08:33:42 2004
-+++ jsprf.c	Sat Aug  6 19:18:26 2005
-@@ -56,5 +56,5 @@
- */
- #ifdef HAVE_VA_COPY
--#define VARARGS_ASSIGN(foo, bar)        VA_COPY(foo,bar)
-+#define VARARGS_ASSIGN(foo, bar)        va_copy(foo,bar)
- #elif defined(HAVE_VA_LIST_AS_ARRAY)
- #define VARARGS_ASSIGN(foo, bar)        foo[0] = bar[0]
---- js.c	Wed Feb 11 02:21:59 2004
-+++ js.c	Sat Aug  6 19:23:09 2005
-@@ -921,5 +921,5 @@
-         delta = SN_DELTA(sn);
-         offset += delta;
--        fprintf(gOutFile, "%3u: %5u [%4u] %-8s",
-+        fprintf(gOutFile, "%3tu: %5u [%4u] %-8s",
-                 PTRDIFF(sn, notes, jssrcnote), offset, delta,
-                 js_SrcNoteSpec[SN_TYPE(sn)].name);
-@@ -1006,5 +1006,5 @@
-     fprintf(gOutFile, "\nException table:\nstart\tend\tcatch\n");
-     while (tn->start && tn->catchStart) {
--        fprintf(gOutFile, "  %d\t%d\t%d\n",
-+        fprintf(gOutFile, "  %td\t%td\t%td\n",
-                tn->start, tn->start + tn->length, tn->catchStart);
-         tn++;
-@@ -1222,6 +1222,6 @@
- #undef  DUMP_ATTR
- 
--        fprintf(fp, " slot %lu flags %x shortid %d\n",
--                sprop->slot, sprop->flags, sprop->shortid);
-+        fprintf(fp, " slot %u flags %x shortid %d\n",
-+                (unsigned)sprop->slot, (int)sprop->flags, (int)sprop->shortid);
-     }
- }
---- jsapi.c	Wed Jun 16 17:42:39 2004
-+++ jsapi.c	Mon Aug  8 02:32:15 2005
-@@ -126,5 +126,5 @@
  static JSBool
  TryArgumentFormatter(JSContext *cx, const char **formatp, JSBool fromJS,
 -                     jsval **vpp, va_list *app)
 +                     jsval **vpp, va_list app)
  {
      const char *format;
-@@ -264,6 +264,5 @@
+     JSArgumentFormatMap *map;
+@@ -263,8 +263,7 @@
+             break;
            default:
              format--;
 -            if (!TryArgumentFormatter(cx, &format, JS_TRUE, &sp,
@@ -314,7 +41,9 @@
 +            if (!TryArgumentFormatter(cx, &format, JS_TRUE, &sp, ap)) {
                  return JS_FALSE;
              }
-@@ -367,6 +366,5 @@
+             /* NB: the formatter already updated sp, so we continue here. */
+@@ -366,8 +365,7 @@
+             break;
            default:
              format--;
 -            if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp,
@@ -322,10 +51,68 @@
 +            if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp, ap)) {
                  goto bad;
              }
-@@ -2190,5 +2188,5 @@
+             /* NB: the formatter already updated sp, so we continue here. */
+--- js.c	2007-04-20 20:45:18.000000000 +0200
++++ js.c	2008-06-19 18:17:29.000000000 +0200
+@@ -978,7 +978,7 @@
+                 }
+             }
+         }
+-        fprintf(gOutFile, "%3u: %5u [%4u] %-8s",
++        fprintf(gOutFile, "%3tu: %5u [%4u] %-8s",
+                 PTRDIFF(sn, notes, jssrcnote), offset, delta, name);
+         switch (type) {
+           case SRC_SETLINE:
+--- jscntxt.h	2007-04-06 22:53:21.000000000 +0200
++++ jscntxt.h	2008-06-19 18:36:28.000000000 +0200
+@@ -598,7 +598,7 @@
+ 
+ #define JS_PUSH_TEMP_ROOT(cx,cnt,arr,tvr)                                     \
+     JS_BEGIN_MACRO                                                            \
+-        JS_ASSERT((ptrdiff_t)(cnt) >= 0);                                     \
++        JS_ASSERT((int)(cnt) >= 0);                                           \
+         (tvr)->count = (ptrdiff_t)(cnt);                                      \
+         (tvr)->u.array = (arr);                                               \
+         JS_PUSH_TEMP_ROOT_COMMON(cx, tvr);                                    \
+--- jsxml.c	2007-04-19 04:18:25.000000000 +0200
++++ jsxml.c	2008-06-19 18:49:44.000000000 +0200
+@@ -1058,7 +1058,10 @@
+             free(array->vector);
+         vector = NULL;
+     } else {
+-        if ((size_t)capacity > ~(size_t)0 / sizeof(void *) ||
++        if ( 
++#if JS_BITS_PER_WORD == 32 
++        	(size_t)capacity > ~(size_t)0 / sizeof(void *) ||  
++#endif
+             !(vector = (void **)
+                        realloc(array->vector, capacity * sizeof(void *)))) {
+             if (cx)
+@@ -1153,7 +1156,10 @@
+                 JS_CEILING_LOG2(log2, capacity);
+                 capacity = JS_BIT(log2);
+             }
+-            if ((size_t)capacity > ~(size_t)0 / sizeof(void *) ||
++            if ( 
++#if JS_BITS_PER_WORD == 32 
++                (size_t)capacity > ~(size_t)0 / sizeof(void *) ||  
++#endif
+                 !(vector = (void **)
+                            realloc(array->vector, capacity * sizeof(void *)))) {
+                 JS_ReportOutOfMemory(cx);
+--- jsarray.c	2007-09-29 01:29:52.000000000 +0200
++++ jsarray.c	2008-06-19 19:12:02.000000000 +0200
+@@ -1051,10 +1051,12 @@
+      * Check that its size does not overflow size_t, which would allow for
+      * indexing beyond the end of the malloc'd vector.
+      */
+-    if (len > ((size_t) -1) / sizeof(jsval)) {
++#if JS_BITS_PER_WORD == 32
++    if ((size_t)len > ~(size_t)0 / sizeof(jsval)) {
+         JS_ReportOutOfMemory(cx);
+         return JS_FALSE;
+     }
++#endif
  
-     if (attrs & JSPROP_INDEX) {
--        id = INT_TO_JSVAL((jsint)name);
-+        id = INT_TO_JSVAL(name);
-         atom = NULL;
-         attrs &= ~JSPROP_INDEX;
+     vec = (jsval *) JS_malloc(cx, ((size_t) len) * sizeof(jsval));
+     if (!vec)


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807021659.m62GxOdL006127>