From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26572 invoked by alias); 11 Nov 2002 22:56:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26550 invoked by uid 71); 11 Nov 2002 22:56:01 -0000 Resent-Date: 11 Nov 2002 22:56:01 -0000 Resent-Message-ID: <20021111225601.26549.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, davh@davh.dk Received: (qmail 17170 invoked from network); 11 Nov 2002 22:47:53 -0000 Received: from unknown (HELO davh.dk) (212.242.181.110) by sources.redhat.com with SMTP; 11 Nov 2002 22:47:53 -0000 Received: (qmail 3212 invoked from network); 11 Nov 2002 23:56:06 -0000 Received: from cine.davh.dk (HELO cine) (mail@192.168.0.110) by chacal.davh.dk with SMTP; 11 Nov 2002 23:56:06 -0000 Received: from davh by cine with local (Exim 3.35 #1 (Debian)) id 18BNKu-00024f-00; Mon, 11 Nov 2002 23:47:16 +0100 Message-Id: Date: Tue, 19 Nov 2002 12:21:00 -0000 From: davh@davh.dk To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org X-Send-Pr-Version: 3.113 Subject: optimization/8532: failure to allocate register pentium4 X-SW-Source: 2002-11/txt/msg00547.txt.bz2 List-Id: >Number: 8532 >Category: optimization >Synopsis: failure to allocate register pentium4 >Confidential: no >Severity: serious >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Nov 11 14:56:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Dennis Haney >Release: 3.2.1 20021103 (Debian prerelease) (Debian testing/unstable) >Organization: >Environment: System: Linux cine 2.4.20-pre11 #8 lør nov 9 18:26:28 CET 2002 i686 unknown unknown GNU/Linux Architecture: i686 host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: /home/packages/gcc/3.2/gcc-3.2-3.2.1ds4/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-java-gc=boehm --enable-objc-gc i386-linux >Description: gcc-3.2 -o jsdtoa.o -c -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\" -DOJI -DEXPORT_JS_API -DJS_USE_SAFE_ARENA -I../../dist/include/js -I../../dist/include -I/y/mozilla/dist/include/nspr -I. -I/usr/X11R6/include -fPIC -I/usr/X11R6/include -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pthread -pipe -DNDEBUG -DTRIMMED -ffunction-sections -O3 -g -march=pentium4 -mcpu=pentium4 -fno-omit-frame-pointer -fstrict-aliasing -I/usr/X11R6/include -include ../../mozilla-config.h -DMOZILLA_CLIENT -Wp,-MD,.deps/jsdtoa.pp jsdtoa.c jsdtoa.c: In function `JS_strtod': jsdtoa.c:1239: warning: `rv0' might be used uninitialized in this function jsdtoa.c:1874: unable to find a register to spill in class `AREG' jsdtoa.c:1874: this is the insn: (insn:QI 2401 2400 2402 (set (reg:CCNO 17 flags) (compare:CCNO (and:SI (subreg:SI (reg/v:DI 21 rxmm0 [369]) 0) (const_int 1 [0x1])) (const_int 0 [0x0]))) 281 {testsi_1} (insn_list 2397 (nil)) (expr_list:REG_DEAD (reg/v:DI 21 rxmm0 [369]) (nil))) jsdtoa.c:1874: confused by earlier errors, bailing out (line 1874 is line 4617 below) >How-To-Repeat: # 1 "jsdtoa.c" # 1 "" # 1 "" # 1 "../../mozilla-config.h" 1 # 2 "" 2 # 1 "jsdtoa.c" # 38 "jsdtoa.c" # 1 "jsstddef.h" 1 # 76 "jsstddef.h" # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 147 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 3 typedef int ptrdiff_t; # 201 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 3 typedef unsigned int size_t; # 294 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 3 typedef long int wchar_t; # 77 "jsstddef.h" 2 # 39 "jsdtoa.c" 2 # 1 "jslibmath.h" 1 # 54 "jslibmath.h" # 1 "/usr/include/math.h" 1 3 # 27 "/usr/include/math.h" 3 # 1 "/usr/include/features.h" 1 3 # 291 "/usr/include/features.h" 3 # 1 "/usr/include/sys/cdefs.h" 1 3 # 292 "/usr/include/features.h" 2 3 # 320 "/usr/include/features.h" 3 # 1 "/usr/include/gnu/stubs.h" 1 3 # 321 "/usr/include/features.h" 2 3 # 28 "/usr/include/math.h" 2 3 # 1 "/usr/include/bits/huge_val.h" 1 3 # 34 "/usr/include/math.h" 2 3 # 1 "/usr/include/bits/mathdef.h" 1 3 # 41 "/usr/include/math.h" 2 3 # 65 "/usr/include/math.h" 3 # 1 "/usr/include/bits/mathcalls.h" 1 3 # 53 "/usr/include/bits/mathcalls.h" 3 extern double acos (double __x) ; extern double __acos (double __x) ; extern double asin (double __x) ; extern double __asin (double __x) ; extern double atan (double __x) ; extern double __atan (double __x) ; extern double atan2 (double __y, double __x) ; extern double __atan2 (double __y, double __x) ; extern double cos (double __x) ; extern double __cos (double __x) ; extern double sin (double __x) ; extern double __sin (double __x) ; extern double tan (double __x) ; extern double __tan (double __x) ; extern double cosh (double __x) ; extern double __cosh (double __x) ; extern double sinh (double __x) ; extern double __sinh (double __x) ; extern double tanh (double __x) ; extern double __tanh (double __x) ; # 87 "/usr/include/bits/mathcalls.h" 3 extern double acosh (double __x) ; extern double __acosh (double __x) ; extern double asinh (double __x) ; extern double __asinh (double __x) ; extern double atanh (double __x) ; extern double __atanh (double __x) ; extern double exp (double __x) ; extern double __exp (double __x) ; extern double frexp (double __x, int *__exponent) ; extern double __frexp (double __x, int *__exponent) ; extern double ldexp (double __x, int __exponent) ; extern double __ldexp (double __x, int __exponent) ; extern double log (double __x) ; extern double __log (double __x) ; extern double log10 (double __x) ; extern double __log10 (double __x) ; extern double modf (double __x, double *__iptr) ; extern double __modf (double __x, double *__iptr) ; # 127 "/usr/include/bits/mathcalls.h" 3 extern double expm1 (double __x) ; extern double __expm1 (double __x) ; extern double log1p (double __x) ; extern double __log1p (double __x) ; extern double logb (double __x) ; extern double __logb (double __x) ; # 152 "/usr/include/bits/mathcalls.h" 3 extern double pow (double __x, double __y) ; extern double __pow (double __x, double __y) ; extern double sqrt (double __x) ; extern double __sqrt (double __x) ; extern double hypot (double __x, double __y) ; extern double __hypot (double __x, double __y) ; extern double cbrt (double __x) ; extern double __cbrt (double __x) ; extern double ceil (double __x) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__const__)); extern double fabs (double __x) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__const__)); extern double floor (double __x) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__const__)); extern double fmod (double __x, double __y) ; extern double __fmod (double __x, double __y) ; extern int __isinf (double __value) __attribute__ ((__const__)); extern int __finite (double __value) __attribute__ ((__const__)); extern int isinf (double __value) __attribute__ ((__const__)); extern int finite (double __value) __attribute__ ((__const__)); extern double drem (double __x, double __y) ; extern double __drem (double __x, double __y) ; extern double significand (double __x) ; extern double __significand (double __x) ; extern double copysign (double __x, double __y) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__const__)); # 231 "/usr/include/bits/mathcalls.h" 3 extern int __isnan (double __value) __attribute__ ((__const__)); extern int isnan (double __value) __attribute__ ((__const__)); extern double j0 (double) ; extern double __j0 (double) ; extern double j1 (double) ; extern double __j1 (double) ; extern double jn (int, double) ; extern double __jn (int, double) ; extern double y0 (double) ; extern double __y0 (double) ; extern double y1 (double) ; extern double __y1 (double) ; extern double yn (int, double) ; extern double __yn (int, double) ; extern double erf (double) ; extern double __erf (double) ; extern double erfc (double) ; extern double __erfc (double) ; extern double lgamma (double) ; extern double __lgamma (double) ; # 265 "/usr/include/bits/mathcalls.h" 3 extern double gamma (double) ; extern double __gamma (double) ; extern double lgamma_r (double, int *__signgamp) ; extern double __lgamma_r (double, int *__signgamp) ; extern double rint (double __x) ; extern double __rint (double __x) ; extern double nextafter (double __x, double __y) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__const__)); extern double remainder (double __x, double __y) ; extern double __remainder (double __x, double __y) ; extern double scalbn (double __x, int __n) ; extern double __scalbn (double __x, int __n) ; extern int ilogb (double __x) ; extern int __ilogb (double __x) ; # 66 "/usr/include/math.h" 2 3 # 88 "/usr/include/math.h" 3 # 1 "/usr/include/bits/mathcalls.h" 1 3 # 53 "/usr/include/bits/mathcalls.h" 3 extern float acosf (float __x) ; extern float __acosf (float __x) ; extern float asinf (float __x) ; extern float __asinf (float __x) ; extern float atanf (float __x) ; extern float __atanf (float __x) ; extern float atan2f (float __y, float __x) ; extern float __atan2f (float __y, float __x) ; extern float cosf (float __x) ; extern float __cosf (float __x) ; extern float sinf (float __x) ; extern float __sinf (float __x) ; extern float tanf (float __x) ; extern float __tanf (float __x) ; extern float coshf (float __x) ; extern float __coshf (float __x) ; extern float sinhf (float __x) ; extern float __sinhf (float __x) ; extern float tanhf (float __x) ; extern float __tanhf (float __x) ; # 87 "/usr/include/bits/mathcalls.h" 3 extern float acoshf (float __x) ; extern float __acoshf (float __x) ; extern float asinhf (float __x) ; extern float __asinhf (float __x) ; extern float atanhf (float __x) ; extern float __atanhf (float __x) ; extern float expf (float __x) ; extern float __expf (float __x) ; extern float frexpf (float __x, int *__exponent) ; extern float __frexpf (float __x, int *__exponent) ; extern float ldexpf (float __x, int __exponent) ; extern float __ldexpf (float __x, int __exponent) ; extern float logf (float __x) ; extern float __logf (float __x) ; extern float log10f (float __x) ; extern float __log10f (float __x) ; extern float modff (float __x, float *__iptr) ; extern float __modff (float __x, float *__iptr) ; # 127 "/usr/include/bits/mathcalls.h" 3 extern float expm1f (float __x) ; extern float __expm1f (float __x) ; extern float log1pf (float __x) ; extern float __log1pf (float __x) ; extern float logbf (float __x) ; extern float __logbf (float __x) ; # 152 "/usr/include/bits/mathcalls.h" 3 extern float powf (float __x, float __y) ; extern float __powf (float __x, float __y) ; extern float sqrtf (float __x) ; extern float __sqrtf (float __x) ; extern float hypotf (float __x, float __y) ; extern float __hypotf (float __x, float __y) ; extern float cbrtf (float __x) ; extern float __cbrtf (float __x) ; extern float ceilf (float __x) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__const__)); extern float fabsf (float __x) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__const__)); extern float floorf (float __x) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__const__)); extern float fmodf (float __x, float __y) ; extern float __fmodf (float __x, float __y) ; extern int __isinff (float __value) __attribute__ ((__const__)); extern int __finitef (float __value) __attribute__ ((__const__)); extern int isinff (float __value) __attribute__ ((__const__)); extern int finitef (float __value) __attribute__ ((__const__)); extern float dremf (float __x, float __y) ; extern float __dremf (float __x, float __y) ; extern float significandf (float __x) ; extern float __significandf (float __x) ; extern float copysignf (float __x, float __y) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__const__)); # 231 "/usr/include/bits/mathcalls.h" 3 extern int __isnanf (float __value) __attribute__ ((__const__)); extern int isnanf (float __value) __attribute__ ((__const__)); extern float j0f (float) ; extern float __j0f (float) ; extern float j1f (float) ; extern float __j1f (float) ; extern float jnf (int, float) ; extern float __jnf (int, float) ; extern float y0f (float) ; extern float __y0f (float) ; extern float y1f (float) ; extern float __y1f (float) ; extern float ynf (int, float) ; extern float __ynf (int, float) ; extern float erff (float) ; extern float __erff (float) ; extern float erfcf (float) ; extern float __erfcf (float) ; extern float lgammaf (float) ; extern float __lgammaf (float) ; # 265 "/usr/include/bits/mathcalls.h" 3 extern float gammaf (float) ; extern float __gammaf (float) ; extern float lgammaf_r (float, int *__signgamp) ; extern float __lgammaf_r (float, int *__signgamp) ; extern float rintf (float __x) ; extern float __rintf (float __x) ; extern float nextafterf (float __x, float __y) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__const__)); extern float remainderf (float __x, float __y) ; extern float __remainderf (float __x, float __y) ; extern float scalbnf (float __x, int __n) ; extern float __scalbnf (float __x, int __n) ; extern int ilogbf (float __x) ; extern int __ilogbf (float __x) ; # 89 "/usr/include/math.h" 2 3 # 109 "/usr/include/math.h" 3 # 1 "/usr/include/bits/mathcalls.h" 1 3 # 53 "/usr/include/bits/mathcalls.h" 3 extern long double acosl (long double __x) ; extern long double __acosl (long double __x) ; extern long double asinl (long double __x) ; extern long double __asinl (long double __x) ; extern long double atanl (long double __x) ; extern long double __atanl (long double __x) ; extern long double atan2l (long double __y, long double __x) ; extern long double __atan2l (long double __y, long double __x) ; extern long double cosl (long double __x) ; extern long double __cosl (long double __x) ; extern long double sinl (long double __x) ; extern long double __sinl (long double __x) ; extern long double tanl (long double __x) ; extern long double __tanl (long double __x) ; extern long double coshl (long double __x) ; extern long double __coshl (long double __x) ; extern long double sinhl (long double __x) ; extern long double __sinhl (long double __x) ; extern long double tanhl (long double __x) ; extern long double __tanhl (long double __x) ; # 87 "/usr/include/bits/mathcalls.h" 3 extern long double acoshl (long double __x) ; extern long double __acoshl (long double __x) ; extern long double asinhl (long double __x) ; extern long double __asinhl (long double __x) ; extern long double atanhl (long double __x) ; extern long double __atanhl (long double __x) ; extern long double expl (long double __x) ; extern long double __expl (long double __x) ; extern long double frexpl (long double __x, int *__exponent) ; extern long double __frexpl (long double __x, int *__exponent) ; extern long double ldexpl (long double __x, int __exponent) ; extern long double __ldexpl (long double __x, int __exponent) ; extern long double logl (long double __x) ; extern long double __logl (long double __x) ; extern long double log10l (long double __x) ; extern long double __log10l (long double __x) ; extern long double modfl (long double __x, long double *__iptr) ; extern long double __modfl (long double __x, long double *__iptr) ; # 127 "/usr/include/bits/mathcalls.h" 3 extern long double expm1l (long double __x) ; extern long double __expm1l (long double __x) ; extern long double log1pl (long double __x) ; extern long double __log1pl (long double __x) ; extern long double logbl (long double __x) ; extern long double __logbl (long double __x) ; # 152 "/usr/include/bits/mathcalls.h" 3 extern long double powl (long double __x, long double __y) ; extern long double __powl (long double __x, long double __y) ; extern long double sqrtl (long double __x) ; extern long double __sqrtl (long double __x) ; extern long double hypotl (long double __x, long double __y) ; extern long double __hypotl (long double __x, long double __y) ; extern long double cbrtl (long double __x) ; extern long double __cbrtl (long double __x) ; extern long double ceill (long double __x) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__const__)); extern long double fabsl (long double __x) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__const__)); extern long double floorl (long double __x) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) ; extern long double __fmodl (long double __x, long double __y) ; extern int __isinfl (long double __value) __attribute__ ((__const__)); extern int __finitel (long double __value) __attribute__ ((__const__)); extern int isinfl (long double __value) __attribute__ ((__const__)); extern int finitel (long double __value) __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) ; extern long double __dreml (long double __x, long double __y) ; extern long double significandl (long double __x) ; extern long double __significandl (long double __x) ; extern long double copysignl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__const__)); # 231 "/usr/include/bits/mathcalls.h" 3 extern int __isnanl (long double __value) __attribute__ ((__const__)); extern int isnanl (long double __value) __attribute__ ((__const__)); extern long double j0l (long double) ; extern long double __j0l (long double) ; extern long double j1l (long double) ; extern long double __j1l (long double) ; extern long double jnl (int, long double) ; extern long double __jnl (int, long double) ; extern long double y0l (long double) ; extern long double __y0l (long double) ; extern long double y1l (long double) ; extern long double __y1l (long double) ; extern long double ynl (int, long double) ; extern long double __ynl (int, long double) ; extern long double erfl (long double) ; extern long double __erfl (long double) ; extern long double erfcl (long double) ; extern long double __erfcl (long double) ; extern long double lgammal (long double) ; extern long double __lgammal (long double) ; # 265 "/usr/include/bits/mathcalls.h" 3 extern long double gammal (long double) ; extern long double __gammal (long double) ; extern long double lgammal_r (long double, int *__signgamp) ; extern long double __lgammal_r (long double, int *__signgamp) ; extern long double rintl (long double __x) ; extern long double __rintl (long double __x) ; extern long double nextafterl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__const__)); extern long double remainderl (long double __x, long double __y) ; extern long double __remainderl (long double __x, long double __y) ; extern long double scalbnl (long double __x, int __n) ; extern long double __scalbnl (long double __x, int __n) ; extern int ilogbl (long double __x) ; extern int __ilogbl (long double __x) ; # 110 "/usr/include/math.h" 2 3 # 125 "/usr/include/math.h" 3 extern int signgam; # 252 "/usr/include/math.h" 3 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 277 "/usr/include/math.h" 3 struct exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct exception *__exc); # 362 "/usr/include/math.h" 3 # 1 "/usr/include/bits/mathinline.h" 1 3 # 291 "/usr/include/bits/mathinline.h" 3 extern __inline double __sgn (double) ; extern __inline double __sgn (double __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } extern __inline float __sgnf (float) ; extern __inline float __sgnf (float __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } extern __inline long double __sgnl (long double) ; extern __inline long double __sgnl (long double __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } # 425 "/usr/include/bits/mathinline.h" 3 extern __inline double atan2 (double __y, double __x) { register long double __value; __asm __volatile__ ("fpatan" : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); return __value; } extern __inline float atan2f (float __y, float __x) { register long double __value; __asm __volatile__ ("fpatan" : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); return __value; } extern __inline long double atan2l (long double __y, long double __x) { register long double __value; __asm __volatile__ ("fpatan" : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); return __value; } extern __inline long double __atan2l (long double __y, long double __x) { register long double __value; __asm __volatile__ ("fpatan" : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); return __value; } extern __inline double fmod (double __x, double __y) { register long double __value; __asm __volatile__ ("1: fprem\n\t" "fnstsw %%ax\n\t" "sahf\n\t" "jp 1b" : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); return __value; } extern __inline float fmodf (float __x, float __y) { register long double __value; __asm __volatile__ ("1: fprem\n\t" "fnstsw %%ax\n\t" "sahf\n\t" "jp 1b" : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); return __value; } extern __inline long double fmodl (long double __x, long double __y) { register long double __value; __asm __volatile__ ("1: fprem\n\t" "fnstsw %%ax\n\t" "sahf\n\t" "jp 1b" : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); return __value; } # 440 "/usr/include/bits/mathinline.h" 3 extern __inline double sqrt (double __x) { register double __result; __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x)); return __result; } extern __inline float sqrtf (float __x) { register float __result; __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x)); return __result; } extern __inline long double sqrtl (long double __x) { register long double __result; __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x)); return __result; } extern __inline long double __sqrtl (long double __x) { register long double __result; __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x)); return __result; } extern __inline double fabs (double __x) { return __builtin_fabs (__x); } extern __inline float fabsf (float __x) { return __builtin_fabsf (__x); } extern __inline long double fabsl (long double __x) { return __builtin_fabsl (__x); } extern __inline long double __fabsl (long double __x) { return __builtin_fabsl (__x); } # 466 "/usr/include/bits/mathinline.h" 3 extern __inline double atan (double __x) { register double __result; __asm __volatile__ ("fld1; fpatan" : "=t" (__result) : "0" (__x) : "st(1)"); return __result; } extern __inline float atanf (float __x) { register float __result; __asm __volatile__ ("fld1; fpatan" : "=t" (__result) : "0" (__x) : "st(1)"); return __result; } extern __inline long double atanl (long double __x) { register long double __result; __asm __volatile__ ("fld1; fpatan" : "=t" (__result) : "0" (__x) : "st(1)"); return __result; } extern __inline long double __sgn1l (long double) ; extern __inline long double __sgn1l (long double __x) { __extension__ union { long double __xld; unsigned int __xi[3]; } __n = { __xld: __x }; __n.__xi[2] = (__n.__xi[2] & 0x8000) | 0x3fff; __n.__xi[1] = 0x80000000; __n.__xi[0] = 0; return __n.__xld; } # 492 "/usr/include/bits/mathinline.h" 3 extern __inline double floor (double __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } extern __inline float floorf (float __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } extern __inline long double floorl (long double __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } # 503 "/usr/include/bits/mathinline.h" 3 extern __inline double ceil (double __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } extern __inline float ceilf (float __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } extern __inline long double ceill (long double __x) { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } # 521 "/usr/include/bits/mathinline.h" 3 extern __inline double ldexp (double __x, int __y) { register long double __value; __asm __volatile__ ("fscale" : "=t" (__value) : "0" (__x), "u" ((long double) __y)); return __value; } # 539 "/usr/include/bits/mathinline.h" 3 extern __inline double log1p (double __x) { register long double __value; if (__fabsl (__x) >= 1.0 - 0.5 * 1.41421356237309504880L) __value = logl (1.0 + __x); else __asm __volatile__ ("fldln2\n\t" "fxch\n\t" "fyl2xp1" : "=t" (__value) : "0" (__x) : "st(1)"); return __value; } extern __inline float log1pf (float __x) { register long double __value; if (__fabsl (__x) >= 1.0 - 0.5 * 1.41421356237309504880L) __value = logl (1.0 + __x); else __asm __volatile__ ("fldln2\n\t" "fxch\n\t" "fyl2xp1" : "=t" (__value) : "0" (__x) : "st(1)"); return __value; } extern __inline long double log1pl (long double __x) { register long double __value; if (__fabsl (__x) >= 1.0 - 0.5 * 1.41421356237309504880L) __value = logl (1.0 + __x); else __asm __volatile__ ("fldln2\n\t" "fxch\n\t" "fyl2xp1" : "=t" (__value) : "0" (__x) : "st(1)"); return __value; } # 553 "/usr/include/bits/mathinline.h" 3 extern __inline double asinh (double __x) { register long double __y = __fabsl (__x); return (log1pl (__y * __y / (__sqrtl (__y * __y + 1.0) + 1.0) + __y) * __sgn1l (__x)); } extern __inline float asinhf (float __x) { register long double __y = __fabsl (__x); return (log1pl (__y * __y / (__sqrtl (__y * __y + 1.0) + 1.0) + __y) * __sgn1l (__x)); } extern __inline long double asinhl (long double __x) { register long double __y = __fabsl (__x); return (log1pl (__y * __y / (__sqrtl (__y * __y + 1.0) + 1.0) + __y) * __sgn1l (__x)); } extern __inline double acosh (double __x) { return logl (__x + __sqrtl (__x - 1.0) * __sqrtl (__x + 1.0)); } extern __inline float acoshf (float __x) { return logl (__x + __sqrtl (__x - 1.0) * __sqrtl (__x + 1.0)); } extern __inline long double acoshl (long double __x) { return logl (__x + __sqrtl (__x - 1.0) * __sqrtl (__x + 1.0)); } extern __inline double atanh (double __x) { register long double __y = __fabsl (__x); return -0.5 * log1pl (-(__y + __y) / (1.0 + __y)) * __sgn1l (__x); } extern __inline float atanhf (float __x) { register long double __y = __fabsl (__x); return -0.5 * log1pl (-(__y + __y) / (1.0 + __y)) * __sgn1l (__x); } extern __inline long double atanhl (long double __x) { register long double __y = __fabsl (__x); return -0.5 * log1pl (-(__y + __y) / (1.0 + __y)) * __sgn1l (__x); } extern __inline double hypot (double __x, double __y) { return __sqrtl (__x * __x + __y * __y); } extern __inline float hypotf (float __x, float __y) { return __sqrtl (__x * __x + __y * __y); } extern __inline long double hypotl (long double __x, long double __y) { return __sqrtl (__x * __x + __y * __y); } extern __inline double logb (double __x) { register long double __value; register long double __junk; __asm __volatile__ ("fxtract\n\t" : "=t" (__junk), "=u" (__value) : "0" (__x)); return __value; } extern __inline float logbf (float __x) { register long double __value; register long double __junk; __asm __volatile__ ("fxtract\n\t" : "=t" (__junk), "=u" (__value) : "0" (__x)); return __value; } extern __inline long double logbl (long double __x) { register long double __value; register long double __junk; __asm __volatile__ ("fxtract\n\t" : "=t" (__junk), "=u" (__value) : "0" (__x)); return __value; } # 652 "/usr/include/bits/mathinline.h" 3 extern __inline double drem (double __x, double __y) { register double __value; register int __clobbered; __asm __volatile__ ("1: fprem1\n\t" "fstsw %%ax\n\t" "sahf\n\t" "jp 1b" : "=t" (__value), "=&a" (__clobbered) : "0" (__x), "u" (__y) : "cc"); return __value; } extern __inline float dremf (float __x, float __y) { register double __value; register int __clobbered; __asm __volatile__ ("1: fprem1\n\t" "fstsw %%ax\n\t" "sahf\n\t" "jp 1b" : "=t" (__value), "=&a" (__clobbered) : "0" (__x), "u" (__y) : "cc"); return __value; } extern __inline long double dreml (long double __x, long double __y) { register double __value; register int __clobbered; __asm __volatile__ ("1: fprem1\n\t" "fstsw %%ax\n\t" "sahf\n\t" "jp 1b" : "=t" (__value), "=&a" (__clobbered) : "0" (__x), "u" (__y) : "cc"); return __value; } # 665 "/usr/include/bits/mathinline.h" 3 extern __inline int __finite (double __x) { return (__extension__ (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1] | 0x800fffffu) + 1) >> 31)); } # 363 "/usr/include/math.h" 2 3 # 423 "/usr/include/math.h" 3 # 55 "jslibmath.h" 2 # 1 "jsconfig.h" 1 # 56 "jslibmath.h" 2 # 225 "jslibmath.h" extern double fd_asin (double); extern double fd_acos (double); extern double fd_exp (double); extern double fd_log (double); extern double fd_pow (double, double); # 40 "jsdtoa.c" 2 # 1 "jstypes.h" 1 # 63 "jstypes.h" # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 64 "jstypes.h" 2 # 235 "jstypes.h" # 1 "jsautocfg.h" 1 # 236 "jstypes.h" 2 # 1 "jsosdep.h" 1 # 237 "jstypes.h" 2 # 251 "jstypes.h" typedef unsigned char JSUint8; typedef signed char JSInt8; # 264 "jstypes.h" typedef unsigned short JSUint16; typedef short JSInt16; # 277 "jstypes.h" typedef unsigned int JSUint32; typedef int JSInt32; # 311 "jstypes.h" typedef long long JSInt64; typedef unsigned long long JSUint64; # 335 "jstypes.h" typedef int JSIntn; typedef unsigned int JSUintn; # 346 "jstypes.h" typedef double JSFloat64; typedef size_t JSSize; typedef ptrdiff_t JSPtrdiff; typedef unsigned long JSUptrdiff; # 379 "jstypes.h" typedef JSIntn JSBool; # 389 "jstypes.h" typedef JSUint8 JSPackedBool; typedef long JSWord; typedef unsigned long JSUword; # 1 "jsotypes.h" 1 # 67 "jsotypes.h" # 1 "/usr/include/sys/types.h" 1 3 # 28 "/usr/include/sys/types.h" 3 # 1 "/usr/include/bits/types.h" 1 3 # 29 "/usr/include/bits/types.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 30 "/usr/include/bits/types.h" 2 3 typedef unsigned char __u_char; typedef unsigned short __u_short; typedef unsigned int __u_int; typedef unsigned long __u_long; __extension__ typedef unsigned long long int __u_quad_t; __extension__ typedef long long int __quad_t; # 49 "/usr/include/bits/types.h" 3 typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; typedef __quad_t *__qaddr_t; typedef __u_quad_t __dev_t; typedef __u_int __uid_t; typedef __u_int __gid_t; typedef __u_long __ino_t; typedef __u_int __mode_t; typedef __u_int __nlink_t; typedef long int __off_t; typedef __quad_t __loff_t; typedef int __pid_t; typedef int __ssize_t; typedef __u_long __rlim_t; typedef __u_quad_t __rlim64_t; typedef __u_int __id_t; typedef struct { int __val[2]; } __fsid_t; typedef int __daddr_t; typedef char *__caddr_t; typedef long int __time_t; typedef unsigned int __useconds_t; typedef long int __suseconds_t; typedef long int __swblk_t; typedef long int __clock_t; typedef int __clockid_t; typedef int __timer_t; typedef int __key_t; typedef unsigned short int __ipc_pid_t; typedef long int __blksize_t; typedef long int __blkcnt_t; typedef __quad_t __blkcnt64_t; typedef __u_long __fsblkcnt_t; typedef __u_quad_t __fsblkcnt64_t; typedef __u_long __fsfilcnt_t; typedef __u_quad_t __fsfilcnt64_t; typedef __u_quad_t __ino64_t; typedef __loff_t __off64_t; typedef long int __t_scalar_t; typedef unsigned long int __t_uscalar_t; typedef int __intptr_t; typedef unsigned int __socklen_t; # 31 "/usr/include/sys/types.h" 2 3 # 45 "/usr/include/sys/types.h" 3 typedef __loff_t loff_t; typedef __ino_t ino_t; # 61 "/usr/include/sys/types.h" 3 typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; # 99 "/usr/include/sys/types.h" 3 typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; # 122 "/usr/include/sys/types.h" 3 typedef __key_t key_t; # 132 "/usr/include/sys/types.h" 3 # 1 "/usr/include/time.h" 1 3 # 74 "/usr/include/time.h" 3 typedef __time_t time_t; # 92 "/usr/include/time.h" 3 typedef __clockid_t clockid_t; # 104 "/usr/include/time.h" 3 typedef __timer_t timer_t; # 133 "/usr/include/sys/types.h" 2 3 # 146 "/usr/include/sys/types.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 147 "/usr/include/sys/types.h" 2 3 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 190 "/usr/include/sys/types.h" 3 typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); # 230 "/usr/include/sys/types.h" 3 typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 262 "/usr/include/sys/types.h" 3 # 68 "jsotypes.h" 2 typedef JSUintn uintn; typedef JSUint64 uint64; typedef JSUint32 uint32; typedef JSUint16 uint16; typedef JSUint8 uint8; typedef JSIntn intn; # 95 "jsotypes.h" typedef JSInt64 int64; typedef JSInt32 int32; typedef JSInt16 int16; typedef JSInt8 int8; typedef JSFloat64 float64; # 398 "jstypes.h" 2 # 41 "jsdtoa.c" 2 # 1 "jsdtoa.h" 1 # 42 "jsdtoa.h" # 1 "jscompat.h" 1 # 45 "jscompat.h" # 1 "jslong.h" 1 # 48 "jslong.h" # 66 "jslong.h" extern JSInt64 JSLL_MaxInt(void); extern JSInt64 JSLL_MinInt(void); extern JSInt64 JSLL_Zero(void); # 431 "jslong.h" # 46 "jscompat.h" 2 typedef JSIntn intN; typedef JSUintn uintN; typedef JSUword jsuword; typedef JSWord jsword; typedef float float32; # 43 "jsdtoa.h" 2 # 61 "jsdtoa.h" double JS_strtod(const char *s00, char **se, int *err); # 76 "jsdtoa.h" typedef enum JSDToStrMode { DTOSTR_STANDARD, DTOSTR_STANDARD_EXPONENTIAL, DTOSTR_FIXED, DTOSTR_EXPONENTIAL, DTOSTR_PRECISION } JSDToStrMode; # 100 "jsdtoa.h" char * JS_dtostr(char *buffer, size_t bufferSize, JSDToStrMode mode, int precision, double dval); # 114 "jsdtoa.h" char * JS_dtobasestr(int base, double d); extern void js_FinishDtoa(void); # 42 "jsdtoa.c" 2 # 1 "jsprf.h" 1 # 55 "jsprf.h" # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 1 3 # 39 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 44 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3 # 53 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 typedef struct _IO_FILE FILE; # 71 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 typedef struct _IO_FILE __FILE; # 81 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 # 1 "/usr/include/libio.h" 1 3 # 32 "/usr/include/libio.h" 3 # 1 "/usr/include/_G_config.h" 1 3 # 14 "/usr/include/_G_config.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 321 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 3 typedef unsigned int wint_t; # 15 "/usr/include/_G_config.h" 2 3 # 24 "/usr/include/_G_config.h" 3 # 1 "/usr/include/wchar.h" 1 3 # 48 "/usr/include/wchar.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 49 "/usr/include/wchar.h" 2 3 # 1 "/usr/include/bits/wchar.h" 1 3 # 51 "/usr/include/wchar.h" 2 3 # 71 "/usr/include/wchar.h" 3 typedef struct { int __count; union { wint_t __wch; char __wchb[4]; } __value; } __mbstate_t; # 25 "/usr/include/_G_config.h" 2 3 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; # 44 "/usr/include/_G_config.h" 3 # 1 "/usr/include/gconv.h" 1 3 # 28 "/usr/include/gconv.h" 3 # 1 "/usr/include/wchar.h" 1 3 # 48 "/usr/include/wchar.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 49 "/usr/include/wchar.h" 2 3 # 29 "/usr/include/gconv.h" 2 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 32 "/usr/include/gconv.h" 2 3 enum { __GCONV_OK = 0, __GCONV_NOCONV, __GCONV_NODB, __GCONV_NOMEM, __GCONV_EMPTY_INPUT, __GCONV_FULL_OUTPUT, __GCONV_ILLEGAL_INPUT, __GCONV_INCOMPLETE_INPUT, __GCONV_ILLEGAL_DESCRIPTOR, __GCONV_INTERNAL_ERROR }; enum { __GCONV_IS_LAST = 0x0001, __GCONV_IGNORE_ERRORS = 0x0002 }; struct __gconv_step; struct __gconv_step_data; struct __gconv_loaded_object; struct __gconv_trans_data; typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *, int, int); typedef int (*__gconv_init_fct) (struct __gconv_step *); typedef void (*__gconv_end_fct) (struct __gconv_step *); typedef int (*__gconv_trans_fct) (struct __gconv_step *, struct __gconv_step_data *, void *, __const unsigned char *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *); typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, __const unsigned char *, unsigned char *, unsigned char *); typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, size_t *); typedef int (*__gconv_trans_init_fct) (void **, const char *); typedef void (*__gconv_trans_end_fct) (void *); struct __gconv_trans_data { __gconv_trans_fct __trans_fct; __gconv_trans_context_fct __trans_context_fct; __gconv_trans_end_fct __trans_end_fct; void *__data; struct __gconv_trans_data *__next; }; struct __gconv_step { struct __gconv_loaded_object *__shlib_handle; __const char *__modname; int __counter; char *__from_name; char *__to_name; __gconv_fct __fct; __gconv_init_fct __init_fct; __gconv_end_fct __end_fct; int __min_needed_from; int __max_needed_from; int __min_needed_to; int __max_needed_to; int __stateful; void *__data; }; struct __gconv_step_data { unsigned char *__outbuf; unsigned char *__outbufend; int __flags; int __invocation_counter; int __internal_use; __mbstate_t *__statep; __mbstate_t __state; struct __gconv_trans_data *__trans; }; typedef struct __gconv_info { size_t __nsteps; struct __gconv_step *__steps; __extension__ struct __gconv_step_data __data []; } *__gconv_t; # 45 "/usr/include/_G_config.h" 2 3 typedef union { struct __gconv_info __cd; struct { struct __gconv_info __cd; struct __gconv_step_data __data; } __combined; } _G_iconv_t; typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); # 33 "/usr/include/libio.h" 2 3 # 53 "/usr/include/libio.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdarg.h" 1 3 # 43 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdarg.h" 3 typedef __builtin_va_list __gnuc_va_list; # 54 "/usr/include/libio.h" 2 3 # 162 "/usr/include/libio.h" 3 struct _IO_jump_t; struct _IO_FILE; # 172 "/usr/include/libio.h" 3 typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 195 "/usr/include/libio.h" 3 }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 263 "/usr/include/libio.h" 3 struct _IO_FILE { int _flags; char* _IO_read_ptr; char* _IO_read_end; char* _IO_read_base; char* _IO_write_base; char* _IO_write_ptr; char* _IO_write_end; char* _IO_buf_base; char* _IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; # 311 "/usr/include/libio.h" 3 __off64_t _offset; void *__pad1; void *__pad2; int _mode; char _unused2[15 * sizeof (int) - 2 * sizeof (void *)]; }; typedef struct _IO_FILE _IO_FILE; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; # 350 "/usr/include/libio.h" 3 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, size_t __n); typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); typedef int __io_close_fn (void *__cookie); # 402 "/usr/include/libio.h" 3 extern int __underflow (_IO_FILE *) ; extern int __uflow (_IO_FILE *) ; extern int __overflow (_IO_FILE *, int) ; extern wint_t __wunderflow (_IO_FILE *) ; extern wint_t __wuflow (_IO_FILE *) ; extern wint_t __woverflow (_IO_FILE *, wint_t) ; # 432 "/usr/include/libio.h" 3 extern int _IO_getc (_IO_FILE *__fp) ; extern int _IO_putc (int __c, _IO_FILE *__fp) ; extern int _IO_feof (_IO_FILE *__fp) ; extern int _IO_ferror (_IO_FILE *__fp) ; extern int _IO_peekc_locked (_IO_FILE *__fp) ; extern void _IO_flockfile (_IO_FILE *) ; extern void _IO_funlockfile (_IO_FILE *) ; extern int _IO_ftrylockfile (_IO_FILE *) ; # 462 "/usr/include/libio.h" 3 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict) ; extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list) ; extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) ; extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) ; extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) ; extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) ; extern void _IO_free_backup_area (_IO_FILE *) ; # 82 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3 # 95 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 typedef _G_fpos_t fpos_t; # 147 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 # 1 "/usr/include/bits/stdio_lim.h" 1 3 # 148 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; extern int remove (__const char *__filename) ; extern int rename (__const char *__old, __const char *__new) ; extern FILE *tmpfile (void) ; # 180 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern char *tmpnam (char *__s) ; # 190 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern char *tmpnam_r (char *__s) ; # 202 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern char *tempnam (__const char *__dir, __const char *__pfx) __attribute__ ((__malloc__)); extern int fclose (FILE *__stream) ; extern int fflush (FILE *__stream) ; extern int fflush_unlocked (FILE *__stream) ; # 225 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) ; extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) ; # 248 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 # 259 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern FILE *fdopen (int __fd, __const char *__modes) ; # 280 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) ; extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) ; # 302 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...) ; extern int printf (__const char *__restrict __format, ...) ; extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...) ; extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) ; extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg) ; extern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) ; # 358 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) ; extern int scanf (__const char *__restrict __format, ...) ; extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) ; # 388 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern int fgetc (FILE *__stream) ; extern int getc (FILE *__stream) ; extern int getchar (void) ; extern int getc_unlocked (FILE *__stream) ; extern int getchar_unlocked (void) ; extern int fgetc_unlocked (FILE *__stream) ; extern int fputc (int __c, FILE *__stream) ; extern int putc (int __c, FILE *__stream) ; extern int putchar (int __c) ; extern int fputc_unlocked (int __c, FILE *__stream) ; extern int putc_unlocked (int __c, FILE *__stream) ; extern int putchar_unlocked (int __c) ; extern int getw (FILE *__stream) ; extern int putw (int __w, FILE *__stream) ; extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ; extern char *gets (char *__s) ; # 484 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream) ; extern int puts (__const char *__s) ; extern int ungetc (int __c, FILE *__stream) ; extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) ; # 513 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern int fseek (FILE *__stream, long int __off, int __whence) ; extern long int ftell (FILE *__stream) ; extern void rewind (FILE *__stream) ; # 553 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) ; extern int fsetpos (FILE *__stream, __const fpos_t *__pos) ; # 572 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 # 582 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern void clearerr (FILE *__stream) ; extern int feof (FILE *__stream) ; extern int ferror (FILE *__stream) ; extern void clearerr_unlocked (FILE *__stream) ; extern int feof_unlocked (FILE *__stream) ; extern int ferror_unlocked (FILE *__stream) ; extern void perror (__const char *__s) ; # 1 "/usr/include/bits/sys_errlist.h" 1 3 # 609 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3 extern int fileno (FILE *__stream) ; extern int fileno_unlocked (FILE *__stream) ; extern FILE *popen (__const char *__command, __const char *__modes) ; extern int pclose (FILE *__stream) ; extern char *ctermid (char *__s) ; # 662 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 extern void flockfile (FILE *__stream) ; extern int ftrylockfile (FILE *__stream) ; extern void funlockfile (FILE *__stream) ; # 683 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 3 # 1 "/usr/include/bits/stdio.h" 1 3 # 33 "/usr/include/bits/stdio.h" 3 extern __inline int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } extern __inline int getchar (void) { return _IO_getc (stdin); } extern __inline int getc_unlocked (FILE *__fp) { return ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline int getchar_unlocked (void) { return ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline int putchar (int __c) { return _IO_putc (__c, stdout); } extern __inline int fputc_unlocked (int __c, FILE *__stream) { return (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putc_unlocked (int __c, FILE *__stream) { return (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putchar_unlocked (int __c) { return (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } # 111 "/usr/include/bits/stdio.h" 3 extern __inline int feof_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x10) != 0); } extern __inline int ferror_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x20) != 0); } # 684 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdio.h" 2 3 # 56 "jsprf.h" 2 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdarg.h" 1 3 # 110 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stdarg.h" 3 typedef __gnuc_va_list va_list; # 57 "jsprf.h" 2 extern JSUint32 JS_snprintf(char *out, JSUint32 outlen, const char *fmt, ...); extern char* JS_smprintf(const char *fmt, ...); extern void JS_smprintf_free(char *mem); # 86 "jsprf.h" extern char* JS_sprintf_append(char *last, const char *fmt, ...); # 95 "jsprf.h" typedef JSIntn (*JSStuffFunc)(void *arg, const char *s, JSUint32 slen); extern JSUint32 JS_sxprintf(JSStuffFunc f, void *arg, const char *fmt, ...); extern JSUint32 JS_vsnprintf(char *out, JSUint32 outlen, const char *fmt, va_list ap); extern char* JS_vsmprintf(const char *fmt, va_list ap); extern char* JS_vsprintf_append(char *last, const char *fmt, va_list ap); extern JSUint32 JS_vsxprintf(JSStuffFunc f, void *arg, const char *fmt, va_list ap); # 140 "jsprf.h" extern JSInt32 JS_sscanf(const char *buf, const char *fmt, ...); # 43 "jsdtoa.c" 2 # 1 "jsutil.h" 1 # 42 "jsutil.h" # 97 "jsutil.h" extern void JS_Abort(void); # 44 "jsdtoa.c" 2 # 1 "jspubtd.h" 1 # 43 "jspubtd.h" typedef uint16 jschar; typedef int32 jsint; typedef uint32 jsuint; typedef float64 jsdouble; typedef jsword jsval; typedef jsword jsid; typedef int32 jsrefcount; typedef enum JSVersion { JSVERSION_1_0 = 100, JSVERSION_1_1 = 110, JSVERSION_1_2 = 120, JSVERSION_1_3 = 130, JSVERSION_1_4 = 140, JSVERSION_1_5 = 150, JSVERSION_DEFAULT = 0, JSVERSION_UNKNOWN = -1 } JSVersion; typedef enum JSType { JSTYPE_VOID, JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_STRING, JSTYPE_NUMBER, JSTYPE_BOOLEAN, JSTYPE_LIMIT } JSType; typedef enum JSAccessMode { JSACC_PROTO = 0, JSACC_PARENT = 1, JSACC_IMPORT = 2, JSACC_WATCH = 3, JSACC_READ = 4, JSACC_WRITE = 8, JSACC_LIMIT } JSAccessMode; typedef enum JSIterateOp { JSENUMERATE_INIT, JSENUMERATE_NEXT, JSENUMERATE_DESTROY } JSIterateOp; typedef struct JSClass JSClass; typedef struct JSConstDoubleSpec JSConstDoubleSpec; typedef struct JSContext JSContext; typedef struct JSErrorReport JSErrorReport; typedef struct JSFunction JSFunction; typedef struct JSFunctionSpec JSFunctionSpec; typedef struct JSIdArray JSIdArray; typedef struct JSProperty JSProperty; typedef struct JSPropertySpec JSPropertySpec; typedef struct JSObject JSObject; typedef struct JSObjectMap JSObjectMap; typedef struct JSObjectOps JSObjectOps; typedef struct JSRuntime JSRuntime; typedef struct JSRuntime JSTaskState; typedef struct JSScript JSScript; typedef struct JSString JSString; typedef struct JSXDRState JSXDRState; typedef struct JSExceptionState JSExceptionState; typedef struct JSLocaleCallbacks JSLocaleCallbacks; # 132 "jspubtd.h" typedef JSBool (* JSPropertyOp)(JSContext *cx, JSObject *obj, jsval id, jsval *vp); # 163 "jspubtd.h" typedef JSBool (* JSNewEnumerateOp)(JSContext *cx, JSObject *obj, JSIterateOp enum_op, jsval *statep, jsid *idp); typedef JSBool (* JSEnumerateOp)(JSContext *cx, JSObject *obj); # 187 "jspubtd.h" typedef JSBool (* JSResolveOp)(JSContext *cx, JSObject *obj, jsval id); # 200 "jspubtd.h" typedef JSBool (* JSNewResolveOp)(JSContext *cx, JSObject *obj, jsval id, uintN flags, JSObject **objp); typedef JSBool (* JSConvertOp)(JSContext *cx, JSObject *obj, JSType type, jsval *vp); typedef void (* JSFinalizeOp)(JSContext *cx, JSObject *obj); typedef void (* JSStringFinalizeOp)(JSContext *cx, JSString *str); # 246 "jspubtd.h" typedef JSObjectOps * (* JSGetObjectOps)(JSContext *cx, JSClass *clasp); # 261 "jspubtd.h" typedef JSBool (* JSCheckAccessOp)(JSContext *cx, JSObject *obj, jsval id, JSAccessMode mode, jsval *vp); typedef JSBool (* JSXDRObjectOp)(JSXDRState *xdr, JSObject **objp); typedef JSBool (* JSHasInstanceOp)(JSContext *cx, JSObject *obj, jsval v, JSBool *bp); # 299 "jspubtd.h" typedef uint32 (* JSMarkOp)(JSContext *cx, JSObject *obj, void *arg); # 317 "jspubtd.h" typedef JSObjectMap * (* JSNewObjectMapOp)(JSContext *cx, jsrefcount nrefs, JSObjectOps *ops, JSClass *clasp, JSObject *obj); typedef void (* JSObjectMapOp)(JSContext *cx, JSObjectMap *map); # 346 "jspubtd.h" typedef JSBool (* JSLookupPropOp)(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, JSProperty **propp ); # 366 "jspubtd.h" typedef JSBool (* JSDefinePropOp)(JSContext *cx, JSObject *obj, jsid id, jsval value, JSPropertyOp getter, JSPropertyOp setter, uintN attrs, JSProperty **propp); # 380 "jspubtd.h" typedef JSBool (* JSPropertyIdOp)(JSContext *cx, JSObject *obj, jsid id, jsval *vp); typedef JSBool (* JSAttributesOp)(JSContext *cx, JSObject *obj, jsid id, JSProperty *prop, uintN *attrsp); typedef JSBool (* JSCheckAccessIdOp)(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode, jsval *vp, uintN *attrsp); typedef JSObject * (* JSObjectOp)(JSContext *cx, JSObject *obj); typedef void (* JSPropertyRefOp)(JSContext *cx, JSObject *obj, JSProperty *prop); typedef JSBool (* JSSetObjectSlotOp)(JSContext *cx, JSObject *obj, uint32 slot, JSObject *pobj); # 444 "jspubtd.h" typedef jsval (* JSGetRequiredSlotOp)(JSContext *cx, JSObject *obj, uint32 slot); typedef void (* JSSetRequiredSlotOp)(JSContext *cx, JSObject *obj, uint32 slot, jsval v); typedef JSBool (* JSNative)(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); typedef enum JSGCStatus { JSGC_BEGIN, JSGC_END, JSGC_MARK_END, JSGC_FINALIZE_END } JSGCStatus; typedef JSBool (* JSGCCallback)(JSContext *cx, JSGCStatus status); typedef JSBool (* JSBranchCallback)(JSContext *cx, JSScript *script); typedef void (* JSErrorReporter)(JSContext *cx, const char *message, JSErrorReport *report); typedef struct JSErrorFormatString { const char *format; uintN argCount; } JSErrorFormatString; typedef const JSErrorFormatString * (* JSErrorCallback)(void *userRef, const char *locale, const uintN errorNumber); typedef JSBool (* JSArgumentFormatter)(JSContext *cx, const char *format, JSBool fromJS, jsval **vpp, va_list *app); typedef JSBool (* JSLocaleToUpperCase)(JSContext *cx, JSString *src, jsval *rval); typedef JSBool (* JSLocaleToLowerCase)(JSContext *cx, JSString *src, jsval *rval); typedef JSBool (* JSLocaleCompare)(JSContext *cx, JSString *src1, JSString *src2, jsval *rval); typedef struct JSPrincipals JSPrincipals; # 520 "jspubtd.h" typedef JSBool (* JSPrincipalsTranscoder)(JSXDRState *xdr, JSPrincipals **principalsp); # 45 "jsdtoa.c" 2 # 1 "jsnum.h" 1 # 49 "jsnum.h" # 67 "jsnum.h" typedef union { jsdouble value; struct { uint32 lsw; uint32 msw; } parts; } js_ieee_double_shape_type; # 146 "jsnum.h" extern JSBool js_InitRuntimeNumberState(JSContext *cx); extern void js_FinishRuntimeNumberState(JSContext *cx); extern JSObject * js_InitNumberClass(JSContext *cx, JSObject *obj); extern const char js_Infinity_str[]; extern const char js_NaN_str[]; extern const char js_isNaN_str[]; extern const char js_isFinite_str[]; extern const char js_parseFloat_str[]; extern const char js_parseInt_str[]; extern jsdouble * js_NewDouble(JSContext *cx, jsdouble d); extern void js_FinalizeDouble(JSContext *cx, jsdouble *dp); extern JSBool js_NewDoubleValue(JSContext *cx, jsdouble d, jsval *rval); extern JSBool js_NewNumberValue(JSContext *cx, jsdouble d, jsval *rval); extern JSObject * js_NumberToObject(JSContext *cx, jsdouble d); extern JSString * js_NumberToString(JSContext *cx, jsdouble d); extern JSBool js_ValueToNumber(JSContext *cx, jsval v, jsdouble *dp); extern JSBool js_ValueToECMAInt32(JSContext *cx, jsval v, int32 *ip); extern JSBool js_DoubleToECMAInt32(JSContext *cx, jsdouble d, int32 *ip); extern JSBool js_ValueToECMAUint32(JSContext *cx, jsval v, uint32 *ip); extern JSBool js_DoubleToECMAUint32(JSContext *cx, jsdouble d, uint32 *ip); extern JSBool js_ValueToInt32(JSContext *cx, jsval v, int32 *ip); extern JSBool js_ValueToUint16(JSContext *cx, jsval v, uint16 *ip); extern jsdouble js_DoubleToInteger(jsdouble d); # 245 "jsnum.h" extern JSBool js_strtod(JSContext *cx, const jschar *s, const jschar **ep, jsdouble *dp); # 255 "jsnum.h" extern JSBool js_strtointeger(JSContext *cx, const jschar *s, const jschar **ep, jsint radix, jsdouble *dp); # 46 "jsdtoa.c" 2 # 1 "/y/mozilla/dist/include/nspr/prlock.h" 1 # 48 "/y/mozilla/dist/include/nspr/prlock.h" # 1 "/y/mozilla/dist/include/nspr/prtypes.h" 1 # 55 "/y/mozilla/dist/include/nspr/prtypes.h" # 1 "/y/mozilla/dist/include/nspr/prcpucfg.h" 1 # 56 "/y/mozilla/dist/include/nspr/prtypes.h" 2 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 59 "/y/mozilla/dist/include/nspr/prtypes.h" 2 # 252 "/y/mozilla/dist/include/nspr/prtypes.h" # 262 "/y/mozilla/dist/include/nspr/prtypes.h" typedef unsigned char PRUint8; # 276 "/y/mozilla/dist/include/nspr/prtypes.h" typedef signed char PRInt8; # 301 "/y/mozilla/dist/include/nspr/prtypes.h" typedef unsigned short PRUint16; typedef short PRInt16; # 326 "/y/mozilla/dist/include/nspr/prtypes.h" typedef unsigned int PRUint32; typedef int PRInt32; # 372 "/y/mozilla/dist/include/nspr/prtypes.h" typedef long long PRInt64; typedef unsigned long long PRUint64; # 396 "/y/mozilla/dist/include/nspr/prtypes.h" typedef int PRIntn; typedef unsigned int PRUintn; # 407 "/y/mozilla/dist/include/nspr/prtypes.h" typedef double PRFloat64; typedef size_t PRSize; typedef PRInt32 PROffset32; typedef PRInt64 PROffset64; typedef ptrdiff_t PRPtrdiff; typedef unsigned long PRUptrdiff; # 449 "/y/mozilla/dist/include/nspr/prtypes.h" typedef PRIntn PRBool; # 459 "/y/mozilla/dist/include/nspr/prtypes.h" typedef PRUint8 PRPackedBool; typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; # 478 "/y/mozilla/dist/include/nspr/prtypes.h" typedef long PRWord; typedef unsigned long PRUword; # 520 "/y/mozilla/dist/include/nspr/prtypes.h" # 1 "/y/mozilla/dist/include/nspr/obsolete/protypes.h" 1 # 521 "/y/mozilla/dist/include/nspr/prtypes.h" 2 # 49 "/y/mozilla/dist/include/nspr/prlock.h" 2 # 63 "/y/mozilla/dist/include/nspr/prlock.h" typedef struct PRLock PRLock; # 80 "/y/mozilla/dist/include/nspr/prlock.h" extern PRLock* PR_NewLock(void); # 91 "/y/mozilla/dist/include/nspr/prlock.h" extern void PR_DestroyLock(PRLock *lock); # 102 "/y/mozilla/dist/include/nspr/prlock.h" extern void PR_Lock(PRLock *lock); # 114 "/y/mozilla/dist/include/nspr/prlock.h" extern PRStatus PR_Unlock(PRLock *lock); # 49 "jsdtoa.c" 2 # 189 "jsdtoa.c" # 1 "/usr/include/stdlib.h" 1 3 # 33 "/usr/include/stdlib.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 34 "/usr/include/stdlib.h" 2 3 # 93 "/usr/include/stdlib.h" 3 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; # 137 "/usr/include/stdlib.h" 3 extern size_t __ctype_get_mb_cur_max (void) ; extern double atof (__const char *__nptr) __attribute__ ((__pure__)); extern int atoi (__const char *__nptr) __attribute__ ((__pure__)); extern long int atol (__const char *__nptr) __attribute__ ((__pure__)); __extension__ extern long long int atoll (__const char *__nptr) __attribute__ ((__pure__)); extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) ; # 174 "/usr/include/stdlib.h" 3 extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) ; extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) ; # 197 "/usr/include/stdlib.h" 3 __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) ; __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) ; # 264 "/usr/include/stdlib.h" 3 extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) ; extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) ; extern long double __strtold_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) ; extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) ; extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) ; __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) ; __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) ; extern __inline double strtod (__const char *__restrict __nptr, char **__restrict __endptr) { return __strtod_internal (__nptr, __endptr, 0); } extern __inline long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoul_internal (__nptr, __endptr, __base, 0); } # 358 "/usr/include/stdlib.h" 3 __extension__ extern __inline long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) { return __strtoull_internal (__nptr, __endptr, __base, 0); } extern __inline double atof (__const char *__nptr) { return strtod (__nptr, (char **) ((void *)0)); } extern __inline int atoi (__const char *__nptr) { return (int) strtol (__nptr, (char **) ((void *)0), 10); } extern __inline long int atol (__const char *__nptr) { return strtol (__nptr, (char **) ((void *)0), 10); } __extension__ extern __inline long long int atoll (__const char *__nptr) { return strtoll (__nptr, (char **) ((void *)0), 10); } # 408 "/usr/include/stdlib.h" 3 extern char *l64a (long int __n) ; extern long int a64l (__const char *__s) __attribute__ ((__pure__)); # 421 "/usr/include/stdlib.h" 3 extern long int random (void) ; extern void srandom (unsigned int __seed) ; extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) ; extern char *setstate (char *__statebuf) ; struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) ; extern int srandom_r (unsigned int __seed, struct random_data *__buf) ; extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) ; extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) ; extern int rand (void) ; extern void srand (unsigned int __seed) ; extern int rand_r (unsigned int *__seed) ; extern double drand48 (void) ; extern double erand48 (unsigned short int __xsubi[3]) ; extern long int lrand48 (void) ; extern long int nrand48 (unsigned short int __xsubi[3]) ; extern long int mrand48 (void) ; extern long int jrand48 (unsigned short int __xsubi[3]) ; extern void srand48 (long int __seedval) ; extern unsigned short int *seed48 (unsigned short int __seed16v[3]) ; extern void lcong48 (unsigned short int __param[7]) ; struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) ; extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) ; extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) ; extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) ; extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) ; extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) ; extern int srand48_r (long int __seedval, struct drand48_data *__buffer) ; extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) ; extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) ; extern void *malloc (size_t __size) __attribute__ ((__malloc__)); extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__malloc__)); extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__malloc__)); extern void free (void *__ptr) ; extern void cfree (void *__ptr) ; # 1 "/usr/include/alloca.h" 1 3 # 25 "/usr/include/alloca.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 26 "/usr/include/alloca.h" 2 3 extern void *alloca (size_t __size) ; # 577 "/usr/include/stdlib.h" 2 3 # 590 "/usr/include/stdlib.h" 3 extern void abort (void) __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) ; extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) ; extern void exit (int __status) __attribute__ ((__noreturn__)); # 622 "/usr/include/stdlib.h" 3 extern char *getenv (__const char *__name) ; extern char *__secure_getenv (__const char *__name) ; extern int putenv (char *__string) ; # 652 "/usr/include/stdlib.h" 3 extern int clearenv (void) ; # 661 "/usr/include/stdlib.h" 3 extern char *mktemp (char *__template) ; extern int mkstemp (char *__template) ; # 692 "/usr/include/stdlib.h" 3 extern int system (__const char *__command) ; # 720 "/usr/include/stdlib.h" 3 typedef int (*__compar_fn_t) (__const void *, __const void *); extern void *bsearch (__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar); extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar); extern int abs (int __x) __attribute__ ((__const__)); extern long int labs (long int __x) __attribute__ ((__const__)); extern div_t div (int __numer, int __denom) __attribute__ ((__const__)); extern ldiv_t ldiv (long int __numer, long int __denom) __attribute__ ((__const__)); # 776 "/usr/include/stdlib.h" 3 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) ; extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) ; extern char *gcvt (double __value, int __ndigit, char *__buf) ; extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) ; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) ; extern char *qgcvt (long double __value, int __ndigit, char *__buf) ; extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) ; extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) ; extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) ; extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) ; extern int mblen (__const char *__s, size_t __n) ; extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) ; extern int wctomb (char *__s, wchar_t __wchar) ; extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) ; extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) ; extern int rpmatch (__const char *__response) ; # 914 "/usr/include/stdlib.h" 3 # 190 "jsdtoa.c" 2 # 1 "/usr/include/string.h" 1 3 # 28 "/usr/include/string.h" 3 # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/stddef.h" 1 3 # 34 "/usr/include/string.h" 2 3 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) ; extern void *memmove (void *__dest, __const void *__src, size_t __n) ; extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) ; extern void *memset (void *__s, int __c, size_t __n) ; extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) __attribute__ ((__pure__)); extern void *memchr (__const void *__s, int __c, size_t __n) __attribute__ ((__pure__)); # 80 "/usr/include/string.h" 3 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) ; extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) ; extern char *strcat (char *__restrict __dest, __const char *__restrict __src) ; extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) ; extern int strcmp (__const char *__s1, __const char *__s2) __attribute__ ((__pure__)); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__pure__)); extern int strcoll (__const char *__s1, __const char *__s2) __attribute__ ((__pure__)); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) ; # 126 "/usr/include/string.h" 3 extern char *strdup (__const char *__s) __attribute__ ((__malloc__)); # 160 "/usr/include/string.h" 3 extern char *strchr (__const char *__s, int __c) __attribute__ ((__pure__)); extern char *strrchr (__const char *__s, int __c) __attribute__ ((__pure__)); extern size_t strcspn (__const char *__s, __const char *__reject) __attribute__ ((__pure__)); extern size_t strspn (__const char *__s, __const char *__accept) __attribute__ ((__pure__)); extern char *strpbrk (__const char *__s, __const char *__accept) __attribute__ ((__pure__)); extern char *strstr (__const char *__haystack, __const char *__needle) __attribute__ ((__pure__)); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) ; extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) ; extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) ; # 228 "/usr/include/string.h" 3 extern size_t strlen (__const char *__s) __attribute__ ((__pure__)); # 241 "/usr/include/string.h" 3 extern char *strerror (int __errnum) ; extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) ; extern void __bzero (void *__s, size_t __n) ; # 372 "/usr/include/string.h" 3 # 1 "/usr/include/bits/string.h" 1 3 # 373 "/usr/include/string.h" 2 3 # 1 "/usr/include/bits/string2.h" 1 3 # 52 "/usr/include/bits/string2.h" 3 # 1 "/usr/include/endian.h" 1 3 # 37 "/usr/include/endian.h" 3 # 1 "/usr/include/bits/endian.h" 1 3 # 38 "/usr/include/endian.h" 2 3 # 53 "/usr/include/bits/string2.h" 2 3 # 389 "/usr/include/bits/string2.h" 3 extern void *__rawmemchr (const void *__s, int __c); # 919 "/usr/include/bits/string2.h" 3 extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); extern __inline size_t __strcspn_c1 (__const char *__s, int __reject) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject) ++__result; return __result; } extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2); extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2) ++__result; return __result; } extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3); extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2 && __s[__result] != __reject3) ++__result; return __result; } # 976 "/usr/include/bits/string2.h" 3 extern __inline size_t __strspn_c1 (__const char *__s, int __accept); extern __inline size_t __strspn_c1 (__const char *__s, int __accept) { register size_t __result = 0; while (__s[__result] == __accept) ++__result; return __result; } extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2); extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2) ++__result; return __result; } extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2 || __s[__result] == __accept3) ++__result; return __result; } # 1033 "/usr/include/bits/string2.h" 3 extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, int __accept2); extern __inline char * __strpbrk_c2 (__const char *__s, int __accept1, int __accept2) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline char * __strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 && *__s != __accept3) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } # 1085 "/usr/include/bits/string2.h" 3 extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); extern __inline char * __strtok_r_1c (char *__s, char __sep, char **__nextp) { char *__result; if (__s == ((void *)0)) __s = *__nextp; while (*__s == __sep) ++__s; __result = ((void *)0); if (*__s != '\0') { __result = __s++; while (*__s != '\0') if (*__s++ == __sep) { __s[-1] = '\0'; break; } *__nextp = __s; } return __result; } # 1117 "/usr/include/bits/string2.h" 3 extern char *__strsep_g (char **__stringp, __const char *__delim); # 1135 "/usr/include/bits/string2.h" 3 extern __inline char *__strsep_1c (char **__s, char __reject); extern __inline char * __strsep_1c (char **__s, char __reject) { register char *__retval = *__s; if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : strchr (__retval, __reject)))) != ((void *)0)) *(*__s)++ = '\0'; return __retval; } extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); extern __inline char * __strsep_2c (char **__s, char __reject1, char __reject2) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3); extern __inline char * __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } # 1216 "/usr/include/bits/string2.h" 3 extern char *__strdup (__const char *__string) __attribute__ ((__malloc__)); # 1235 "/usr/include/bits/string2.h" 3 extern char *__strndup (__const char *__string, size_t __n) __attribute__ ((__malloc__)); # 376 "/usr/include/string.h" 2 3 # 191 "jsdtoa.c" 2 # 225 "jsdtoa.c" # 1 "/usr/lib/gcc-lib/i386-linux/3.2.1/include/float.h" 1 3 # 226 "jsdtoa.c" 2 # 319 "jsdtoa.c" static PRLock *freelist_lock; # 335 "jsdtoa.c" struct Bigint { struct Bigint *next; int32 k; int32 maxwds; int32 sign; int32 wds; uint32 x[1]; }; # 390 "jsdtoa.c" typedef struct Bigint Bigint; static Bigint *freelist[15 +1]; static Bigint *Balloc(int32 k) { int32 x; Bigint *rv; # 413 "jsdtoa.c" if ((rv = freelist[k]) != ((void *)0)) freelist[k] = rv->next; if (rv == ((void *)0)) { x = 1 << k; rv = (Bigint *)malloc(sizeof(Bigint) + (x-1)*sizeof(uint32)); # 429 "jsdtoa.c" if (!rv) return ((void *)0); rv->k = k; rv->maxwds = x; } rv->sign = rv->wds = 0; return rv; } static void Bfree(Bigint *v) { if (v) { v->next = freelist[v->k]; freelist[v->k] = v; } } static Bigint *multadd(Bigint *b, int32 m, int32 a) { int32 i, wds; uint32 *x; JSUint64 carry, y; Bigint *b1; # 475 "jsdtoa.c" wds = b->wds; x = b->x; i = 0; carry = a; do { y = *x * (JSUint64)m + carry; carry = y >> 32; *x++ = (uint32)(y & 0xffffffffUL); } while(++i < wds); if (carry) { if (wds >= b->maxwds) { b1 = Balloc(b->k+1); if (!b1) { Bfree(b); return ((void *)0); } memcpy((char *)&b1->sign, (char *)&b->sign, b->wds*sizeof(int32) + 2*sizeof(int32)); Bfree(b); b = b1; } b->x[wds++] = (uint32)carry; b->wds = wds; } return b; } static Bigint *s2b(const char *s, int32 nd0, int32 nd, uint32 y9) { Bigint *b; int32 i, k; int32 x, y; x = (nd + 8) / 9; for(k = 0, y = 1; x > y; y <<= 1, k++) ; b = Balloc(k); if (!b) return ((void *)0); b->x[0] = y9; b->wds = 1; i = 9; if (9 < nd0) { s += 9; do { b = multadd(b, 10, *s++ - '0'); if (!b) return ((void *)0); } while(++i < nd0); s++; } else s += 10; for(; i < nd; i++) { b = multadd(b, 10, *s++ - '0'); if (!b) return ((void *)0); } return b; } static int32 hi0bits(register uint32 x) { register int32 k = 0; if (!(x & 0xffff0000)) { k = 16; x <<= 16; } if (!(x & 0xff000000)) { k += 8; x <<= 8; } if (!(x & 0xf0000000)) { k += 4; x <<= 4; } if (!(x & 0xc0000000)) { k += 2; x <<= 2; } if (!(x & 0x80000000)) { k++; if (!(x & 0x40000000)) return 32; } return k; } static int32 lo0bits(uint32 *y) { register int32 k; register uint32 x = *y; if (x & 7) { if (x & 1) return 0; if (x & 2) { *y = x >> 1; return 1; } *y = x >> 2; return 2; } k = 0; if (!(x & 0xffff)) { k = 16; x >>= 16; } if (!(x & 0xff)) { k += 8; x >>= 8; } if (!(x & 0xf)) { k += 4; x >>= 4; } if (!(x & 0x3)) { k += 2; x >>= 2; } if (!(x & 1)) { k++; x >>= 1; if (!x & 1) return 32; } *y = x; return k; } static Bigint *i2b(int32 i) { Bigint *b; b = Balloc(1); if (!b) return ((void *)0); b->x[0] = i; b->wds = 1; return b; } static Bigint *mult(const Bigint *a, const Bigint *b) { const Bigint *t; Bigint *c; int32 k, wa, wb, wc; uint32 y; uint32 *xc, *xc0, *xce; const uint32 *x, *xa, *xae, *xb, *xbe; JSUint64 carry, z; if (a->wds < b->wds) { t = a; a = b; b = t; } k = a->k; wa = a->wds; wb = b->wds; wc = wa + wb; if (wc > a->maxwds) k++; c = Balloc(k); if (!c) return ((void *)0); for(xc = c->x, xce = xc + wc; xc < xce; xc++) *xc = 0; xa = a->x; xae = xa + wa; xb = b->x; xbe = xb + wb; xc0 = c->x; for(; xb < xbe; xc0++) { if ((y = *xb++) != 0) { x = xa; xc = xc0; carry = 0; do { z = *x++ * (JSUint64)y + *xc + carry; carry = z >> 32; *xc++ = (uint32)(z & 0xffffffffUL); } while(x < xae); *xc = (uint32)carry; } } # 718 "jsdtoa.c" for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ; c->wds = wc; return c; } # 733 "jsdtoa.c" static Bigint *p5s; static PRLock *p5s_lock; static Bigint *pow5mult(Bigint *b, int32 k) { Bigint *b1, *p5, *p51; int32 i; static const int32 p05[3] = { 5, 25, 125 }; if ((i = k & 3) != 0) { b = multadd(b, p05[i-1], 0); if (!b) return ((void *)0); } if (!(k >>= 2)) return b; if (!(p5 = p5s)) { Bigint *wasted_effort = ((void *)0); p5 = i2b(625); if (!p5) { Bfree(b); return ((void *)0); } PR_Lock(p5s_lock); if (!p5s) { p5s = p5; p5->next = 0; } else { wasted_effort = p5; p5 = p5s; } PR_Unlock(p5s_lock); if (wasted_effort) { Bfree(wasted_effort); } # 791 "jsdtoa.c" } for(;;) { if (k & 1) { b1 = mult(b, p5); Bfree(b); if (!b1) return ((void *)0); b = b1; } if (!(k >>= 1)) break; if (!(p51 = p5->next)) { Bigint *wasted_effort = ((void *)0); p51 = mult(p5, p5); if (!p51) { Bfree(b); return ((void *)0); } PR_Lock(p5s_lock); if (!p5->next) { p5->next = p51; p51->next = 0; } else { wasted_effort = p51; p51 = p5->next; } PR_Unlock(p5s_lock); if (wasted_effort) { Bfree(wasted_effort); } # 831 "jsdtoa.c" } p5 = p51; } return b; } static Bigint *lshift(Bigint *b, int32 k) { int32 i, k1, n, n1; Bigint *b1; uint32 *x, *x1, *xe, z; n = k >> 5; k1 = b->k; n1 = n + b->wds + 1; for(i = b->maxwds; n1 > i; i <<= 1) k1++; b1 = Balloc(k1); if (!b1) goto done; x1 = b1->x; for(i = 0; i < n; i++) *x1++ = 0; x = b->x; xe = x + b->wds; if (k &= 0x1f) { k1 = 32 - k; z = 0; do { *x1++ = *x << k | z; z = *x++ >> k1; } while(x < xe); if ((*x1 = z) != 0) ++n1; } else do *x1++ = *x++; while(x < xe); b1->wds = n1 - 1; done: Bfree(b); return b1; } static int32 cmp(Bigint *a, Bigint *b) { uint32 *xa, *xa0, *xb, *xb0; int32 i, j; i = a->wds; j = b->wds; if (i -= j) return i; xa0 = a->x; xa = xa0 + j; xb0 = b->x; xb = xb0 + j; for(;;) { if (*--xa != *--xb) return *xa < *xb ? -1 : 1; if (xa <= xa0) break; } return 0; } static Bigint *diff(Bigint *a, Bigint *b) { Bigint *c; int32 i, wa, wb; uint32 *xa, *xae, *xb, *xbe, *xc; JSUint64 borrow, y; i = cmp(a,b); if (!i) { c = Balloc(0); if (!c) return ((void *)0); c->wds = 1; c->x[0] = 0; return c; } if (i < 0) { c = a; a = b; b = c; i = 1; } else i = 0; c = Balloc(a->k); if (!c) return ((void *)0); c->sign = i; wa = a->wds; xa = a->x; xae = xa + wa; wb = b->wds; xb = b->x; xbe = xb + wb; xc = c->x; borrow = 0; do { y = (JSUint64)*xa++ - *xb++ - borrow; borrow = y >> 32 & 1UL; *xc++ = (uint32)(y & 0xffffffffUL); } while(xb < xbe); while(xa < xae) { y = *xa++ - borrow; borrow = y >> 32 & 1UL; *xc++ = (uint32)(y & 0xffffffffUL); } # 977 "jsdtoa.c" while(!*--xc) wa--; c->wds = wa; return c; } static double ulp(double x) { register int32 L; double a; L = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (x); sh_u.parts.msw; })) & 0x7ff00000) - (53 -1)*0x100000; if (L > 0) { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (a); sh_u.parts.msw = (L); (a) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (a); sh_u.parts.lsw = (0); (a) = sh_u.value; })); } else { L = -L >> 20; if (L < 20) { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (a); sh_u.parts.msw = (0x80000 >> L); (a) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (a); sh_u.parts.lsw = (0); (a) = sh_u.value; })); } else { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (a); sh_u.parts.msw = (0); (a) = sh_u.value; })); L -= 20; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (a); sh_u.parts.lsw = (L >= 31 ? 1 : 1 << (31 - L)); (a) = sh_u.value; })); } } return a; } static double b2d(Bigint *a, int32 *e) { uint32 *xa, *xa0, w, y, z; int32 k; double d; xa0 = a->x; xa = xa0 + a->wds; y = *--xa; k = hi0bits(y); *e = 32 - k; if (k < 11) { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw = (0x3ff00000 | y >> (11 - k)); (d) = sh_u.value; })); w = xa > xa0 ? *--xa : 0; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw = (y << (32-11 + k) | w >> (11 - k)); (d) = sh_u.value; })); goto ret_d; } z = xa > xa0 ? *--xa : 0; if (k -= 11) { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw = (0x3ff00000 | y << k | z >> (32 - k)); (d) = sh_u.value; })); y = xa > xa0 ? *--xa : 0; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw = (z << k | y >> (32 - k)); (d) = sh_u.value; })); } else { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw = (0x3ff00000 | y); (d) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw = (z); (d) = sh_u.value; })); } ret_d: return d; } static Bigint *d2b(double d, int32 *e, int32 *bits) { Bigint *b; int32 de, i, k; uint32 *x, y, z; b = Balloc(1); if (!b) return ((void *)0); x = b->x; z = (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0xfffff; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0x7fffffff); (d) = sh_u.value; })); if ((de = (int32)((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) >> 20)) != 0) z |= 0x100000; if ((y = (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; }))) != 0) { if ((k = lo0bits(&y)) != 0) { x[0] = y | z << (32 - k); z >>= k; } else x[0] = y; i = b->wds = (x[1] = z) ? 2 : 1; } else { ((void) 0); k = lo0bits(&z); x[0] = z; i = b->wds = 1; k += 32; } if (de) { *e = de - 1023 - (53 -1) + k; *bits = 53 - k; } else { *e = de - 1023 - (53 -1) + 1 + k; *bits = 32*i - hi0bits(x[i-1]); } return b; } static double ratio(Bigint *a, Bigint *b) { double da, db; int32 k, ka, kb; da = b2d(a, &ka); db = b2d(b, &kb); k = ka - kb + 32*(a->wds - b->wds); if (k > 0) (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (da); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (da); sh_u.parts.msw; })) + k*0x100000); (da) = sh_u.value; })); else { k = -k; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (db); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (db); sh_u.parts.msw; })) + k*0x100000); (db) = sh_u.value; })); } return da / db; } static const double tens[] = { 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22 }; static const double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 }; static const double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 9007199254740992.e-256 }; # 1186 "jsdtoa.c" static JSBool initialized = (JSIntn)0; static void InitDtoa(void) { freelist_lock = PR_NewLock(); p5s_lock = PR_NewLock(); initialized = (JSIntn)1; } void js_FinishDtoa(void) { int count; Bigint *temp; if (initialized == (JSIntn)1) { PR_DestroyLock(freelist_lock); PR_DestroyLock(p5s_lock); initialized = (JSIntn)0; } for (count = 0; count <= 15; count++) { Bigint **listp = &freelist[count]; while ((temp = *listp) != ((void *)0)) { *listp = temp->next; free(temp); } freelist[count] = ((void *)0); } while (p5s) { temp = p5s; p5s = p5s->next; free(temp); } } double JS_strtod(const char *s00, char **se, int *err) { int32 scale; int32 bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign, e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; const char *s, *s0, *s1; double aadj, aadj1, adj, rv, rv0; int32 L; uint32 y, z; Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; *err = 0; bb = bd = bs = delta = ((void *)0); sign = nz0 = nz = 0; rv = 0.; do { if (!initialized) InitDtoa(); PR_Lock(freelist_lock); } while (0); for(s = s00;;s++) switch(*s) { case '-': sign = 1; case '+': if (*++s) goto break2; case 0: s = s00; goto ret; case '\t': case '\n': case '\v': case '\f': case '\r': case ' ': continue; default: goto break2; } break2: if (*s == '0') { nz0 = 1; while(*++s == '0') ; if (!*s) goto ret; } s0 = s; y = z = 0; for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) if (nd < 9) y = 10*y + c - '0'; else if (nd < 16) z = 10*z + c - '0'; nd0 = nd; if (c == '.') { c = *++s; if (!nd) { for(; c == '0'; c = *++s) nz++; if (c > '0' && c <= '9') { s0 = s; nf += nz; nz = 0; goto have_dig; } goto dig_done; } for(; c >= '0' && c <= '9'; c = *++s) { have_dig: nz++; if (c -= '0') { nf += nz; for(i = 1; i < nz; i++) if (nd++ < 9) y *= 10; else if (nd <= 15 + 1) z *= 10; if (nd++ < 9) y = 10*y + c; else if (nd <= 15 + 1) z = 10*z + c; nz = 0; } } } dig_done: e = 0; if (c == 'e' || c == 'E') { if (!nd && !nz && !nz0) { s = s00; goto ret; } s00 = s; esign = 0; switch(c = *++s) { case '-': esign = 1; case '+': c = *++s; } if (c >= '0' && c <= '9') { while(c == '0') c = *++s; if (c > '0' && c <= '9') { L = c - '0'; s1 = s; while((c = *++s) >= '0' && c <= '9') L = 10*L + c - '0'; if (s - s1 > 8 || L > 19999) e = 19999; else e = (int32)L; if (esign) e = -e; } else e = 0; } else s = s00; } if (!nd) { if (!nz && !nz0) { # 1382 "jsdtoa.c" s = s00; } goto ret; } e1 = e -= nf; if (!nd0) nd0 = nd; k = nd < 15 + 1 ? nd : 15 + 1; rv = y; if (k > 9) rv = tens[k - 9] * rv + z; bd0 = 0; if (nd <= 15 && 1 == 1 ) { if (!e) goto ret; if (e > 0) { if (e <= 22) { rv *= tens[e]; goto ret; } i = 15 - nd; if (e <= 22 + i) { e -= i; rv *= tens[i]; rv *= tens[e]; goto ret; } } else if (e >= -22) { rv /= tens[-e]; goto ret; } } e1 += nd - k; scale = 0; if (e1 > 0) { if ((i = e1 & 15) != 0) rv *= tens[i]; if (e1 &= ~15) { if (e1 > 308) { ovfl: *err = 1; rv = (__extension__ 0x1.0p2047); if (bd0) goto retfree; goto ret; } e1 >>= 4; for(j = 0; e1 > 1; j++, e1 >>= 1) if (e1 & 1) rv *= bigtens[j]; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) - 53*0x100000); (rv) = sh_u.value; })); rv *= bigtens[j]; if ((z = (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0x7ff00000) > 0x100000*(1024 +1023 -53)) goto ovfl; if (z > 0x100000*(1024 +1023 -1-53)) { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = ((0xfffff | 0x100000*(1024 +1023 -1))); (rv) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw = (0xffffffff); (rv) = sh_u.value; })); } else (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) + 53*0x100000); (rv) = sh_u.value; })); } } else if (e1 < 0) { e1 = -e1; if ((i = e1 & 15) != 0) rv /= tens[i]; if (e1 &= ~15) { e1 >>= 4; if (e1 >= 1 << 5) goto undfl; if (e1 & 0x10) scale = 53; for(j = 0; e1 > 0; j++, e1 >>= 1) if (e1 & 1) rv *= tinytens[j]; if (scale && (j = 53 + 1 - (((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0x7ff00000) >> 20)) > 0) { if (j >= 32) { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw = (0); (rv) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & (0xffffffff << (j-32))); (rv) = sh_u.value; })); if (!(__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; }))) (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = (1); (rv) = sh_u.value; })); } else (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; })) & (0xffffffff << j)); (rv) = sh_u.value; })); } # 1510 "jsdtoa.c" if (!rv) { undfl: rv = 0.; *err = 1; if (bd0) goto retfree; goto ret; } # 1526 "jsdtoa.c" } } bd0 = s2b(s0, nd0, nd, y); if (!bd0) goto nomem; for(;;) { bd = Balloc(bd0->k); if (!bd) goto nomem; memcpy((char *)&bd->sign, (char *)&bd0->sign, bd0->wds*sizeof(int32) + 2*sizeof(int32)); bb = d2b(rv, &bbe, &bbbits); if (!bb) goto nomem; bs = i2b(1); if (!bs) goto nomem; if (e >= 0) { bb2 = bb5 = 0; bd2 = bd5 = e; } else { bb2 = bb5 = -e; bd2 = bd5 = 0; } if (bbe >= 0) bb2 += bbe; else bd2 -= bbe; bs2 = bb2; j = bbe - scale; i = j + bbbits - 1; if (i < (-1022)) j += 53 - (-1022); else j = 53 + 1 - bbbits; bb2 += j; bd2 += j; bd2 += scale; i = bb2 < bd2 ? bb2 : bd2; if (i > bs2) i = bs2; if (i > 0) { bb2 -= i; bd2 -= i; bs2 -= i; } if (bb5 > 0) { bs = pow5mult(bs, bb5); if (!bs) goto nomem; bb1 = mult(bs, bb); if (!bb1) goto nomem; Bfree(bb); bb = bb1; } if (bb2 > 0) { bb = lshift(bb, bb2); if (!bb) goto nomem; } if (bd5 > 0) { bd = pow5mult(bd, bd5); if (!bd) goto nomem; } if (bd2 > 0) { bd = lshift(bd, bd2); if (!bd) goto nomem; } if (bs2 > 0) { bs = lshift(bs, bs2); if (!bs) goto nomem; } delta = diff(bb, bd); if (!delta) goto nomem; dsign = delta->sign; delta->sign = 0; i = cmp(delta, bs); if (i < 0) { if (dsign || (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; })) || (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0xfffff || ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0x7ff00000) <= 0x100000 + 53*0x100000 ) { if (!delta->x[0] && delta->wds == 1) dsign = 2; break; } delta = lshift(delta,1); if (!delta) goto nomem; if (cmp(delta, bs) > 0) goto drop_down; break; } if (i == 0) { if (dsign) { if (((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0xfffff) == 0xfffff && (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; })) == 0xffffffff) { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = (((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0x7ff00000) + 0x100000); (rv) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw = (0); (rv) = sh_u.value; })); dsign = 0; break; } } else if (!((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0xfffff) && !(__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; }))) { dsign = 2; drop_down: L = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0x7ff00000) - 0x100000; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = (L | 0xfffff); (rv) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw = (0xffffffff); (rv) = sh_u.value; })); break; } if (!((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; })) & 1)) break; if (dsign) rv += ulp(rv); else { rv -= ulp(rv); if (!rv) goto undfl; } dsign = 1 - dsign; break; } if ((aadj = ratio(delta, bs)) <= 2.) { if (dsign) aadj = aadj1 = 1.; else if ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; })) || (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0xfffff) { if ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; })) == 1 && !(__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; }))) goto undfl; aadj = 1.; aadj1 = -1.; } else { if (aadj < 2./2) aadj = 1./2; else aadj *= 0.5; aadj1 = -aadj; } } else { aadj *= 0.5; aadj1 = dsign ? aadj : -aadj; # 1736 "jsdtoa.c" if (1 == 0) aadj1 += 0.5; } y = (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0x7ff00000; if (y == 0x100000*(1024 +1023 -1)) { rv0 = rv; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) - 53*0x100000); (rv) = sh_u.value; })); adj = aadj1 * ulp(rv); rv += adj; if (((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0x7ff00000) >= 0x100000*(1024 +1023 -53)) { if ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv0); sh_u.parts.msw; })) == (0xfffff | 0x100000*(1024 +1023 -1)) && (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv0); sh_u.parts.lsw; })) == 0xffffffff) goto ovfl; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = ((0xfffff | 0x100000*(1024 +1023 -1))); (rv) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw = (0xffffffff); (rv) = sh_u.value; })); goto cont; } else (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) + 53*0x100000); (rv) = sh_u.value; })); } else { # 1792 "jsdtoa.c" if (y <= 53*0x100000 && aadj > 1.) { aadj1 = (double)(int32)(aadj + 0.5); if (!dsign) aadj1 = -aadj1; } if (scale && y <= 53*0x100000) (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (aadj1); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (aadj1); sh_u.parts.msw; })) + (53 +1)*0x100000 - y); (aadj1) = sh_u.value; })); adj = aadj1 * ulp(rv); rv += adj; } z = (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0x7ff00000; if (!scale) if (y == z) { L = (int32)aadj; aadj -= L; if (dsign || (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; })) || (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0xfffff) { if (aadj < .4999999 || aadj > .5000001) break; } else if (aadj < .4999999/2) break; } cont: Bfree(bb); Bfree(bd); Bfree(bs); Bfree(delta); bb = bd = bs = delta = ((void *)0); } if (scale) { (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv0); sh_u.parts.msw = (0x3ff00000 - 53*0x100000); (rv0) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv0); sh_u.parts.lsw = (0); (rv0) = sh_u.value; })); if (((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.msw; })) & 0x7ff00000) <= 53*0x100000 && (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; })) & 1 && dsign != 2) { if (dsign) { rv += ulp(rv); } else (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (rv); sh_u.parts.lsw; })) & ~1); (rv) = sh_u.value; })); } rv *= rv0; } retfree: Bfree(bb); Bfree(bd); Bfree(bs); Bfree(bd0); Bfree(delta); ret: PR_Unlock(freelist_lock); if (se) *se = (char *)s; return sign ? -rv : rv; nomem: Bfree(bb); Bfree(bd); Bfree(bs); Bfree(bd0); Bfree(delta); *err = 2; return 0; } static uint32 quorem2(Bigint *b, int32 k) { uint32 mask; uint32 result; uint32 *bx, *bxe; int32 w; int32 n = k >> 5; k &= 0x1F; mask = (1<wds - n; if (w <= 0) return 0; ((void) 0); bx = b->x; bxe = bx + n; result = *bxe >> k; *bxe &= mask; if (w == 2) { ((void) 0); if (k) result |= bxe[1] << (32 - k); } n++; while (!*bxe && bxe != bx) { n--; bxe--; } b->wds = n; return result; } static int32 quorem(Bigint *b, Bigint *S) { int32 n; uint32 *bx, *bxe, q, *sx, *sxe; JSUint64 borrow, carry, y, ys; n = S->wds; ((void) 0); if (b->wds < n) return 0; sx = S->x; sxe = sx + --n; bx = b->x; bxe = bx + n; ((void) 0); q = *bxe / (*sxe + 1); ((void) 0); if (q) { borrow = 0; carry = 0; do { ys = *sx++ * (JSUint64)q + carry; carry = ys >> 32; y = *bx - (ys & 0xffffffffUL) - borrow; borrow = y >> 32 & 1UL; *bx++ = (uint32)(y & 0xffffffffUL); # 1956 "jsdtoa.c" } while(sx <= sxe); if (!*bxe) { bx = b->x; while(--bxe > bx && !*bxe) --n; b->wds = n; } } if (cmp(b, S) >= 0) { q++; borrow = 0; carry = 0; bx = b->x; sx = S->x; do { ys = *sx++ + carry; carry = ys >> 32; y = *bx - (ys & 0xffffffffUL) - borrow; borrow = y >> 32 & 1UL; *bx++ = (uint32)(y & 0xffffffffUL); # 1989 "jsdtoa.c" } while(sx <= sxe); bx = b->x; bxe = bx + n; if (!*bxe) { while(--bxe > bx && !*bxe) --n; b->wds = n; } } return (int32)q; } # 2042 "jsdtoa.c" static JSBool js_dtoa(double d, int mode, JSBool biasUp, int ndigits, int *decpt, int *sign, char **rve, char *buf, size_t bufsize) { # 2080 "jsdtoa.c" int32 bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, spec_case, try_quick; int32 L; int32 denorm; uint32 x; Bigint *b, *b1, *delta, *mlo, *mhi, *S; double d2, ds, eps; char *s; if ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0x80000000) { *sign = 1; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & ~0x80000000); (d) = sh_u.value; })); } else *sign = 0; if (((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0x7ff00000) == 0x7ff00000) { *decpt = 9999; s = !(__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) && !((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0xfffff) ? "Infinity" : "NaN"; if ((s[0] == 'I' && bufsize < 9) || (s[0] == 'N' && bufsize < 4)) { ((void) 0); return (JSIntn)0; } strcpy(buf, s); if (rve) { *rve = buf[3] ? buf + 8 : buf + 3; ((void) 0); } return (JSIntn)1; } b = ((void *)0); S = ((void *)0); mlo = mhi = ((void *)0); if (!d) { no_digits: *decpt = 1; if (bufsize < 2) { ((void) 0); return (JSIntn)0; } buf[0] = '0'; buf[1] = '\0'; if (rve) *rve = buf + 1; Bfree(b); Bfree(S); if (mlo != mhi) Bfree(mlo); Bfree(mhi); return (JSIntn)1; } b = d2b(d, &be, &bbits); if (!b) goto nomem; if ((i = (int32)((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) >> 20 & (0x7ff00000>>20))) != 0) { d2 = d; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d2); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d2); sh_u.parts.msw; })) & 0xfffff); (d2) = sh_u.value; })); (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d2); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d2); sh_u.parts.msw; })) | 0x3ff00000); (d2) = sh_u.value; })); # 2177 "jsdtoa.c" i -= 1023; denorm = 0; } else { i = bbits + be + (1023 + (53 -1) - 1); x = i > 32 ? (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) << (64 - i) | (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) >> (i - 32) : (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) << (32 - i); d2 = x; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d2); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d2); sh_u.parts.msw; })) - 31*0x100000); (d2) = sh_u.value; })); i -= (1023 + (53 -1) - 1) + 1; denorm = 1; } ds = (d2-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981; k = (int32)ds; if (ds < 0. && ds != k) k--; k_check = 1; if (k >= 0 && k <= 22) { if (d < tens[k]) k--; k_check = 0; } j = bbits - i - 1; if (j >= 0) { b2 = 0; s2 = j; } else { b2 = -j; s2 = 0; } if (k >= 0) { b5 = 0; s5 = k; s2 += k; } else { b2 -= k; b5 = -k; s5 = 0; } if (mode < 0 || mode > 9) mode = 0; try_quick = 1; if (mode > 5) { mode -= 4; try_quick = 0; } leftright = 1; ilim = ilim1 = 0; switch(mode) { case 0: case 1: ilim = ilim1 = -1; i = 18; ndigits = 0; break; case 2: leftright = 0; case 4: if (ndigits <= 0) ndigits = 1; ilim = ilim1 = i = ndigits; break; case 3: leftright = 0; case 5: i = ndigits + k + 1; ilim = i; ilim1 = i - 1; if (i <= 0) i = 1; } if (bufsize <= (size_t)i) { Bfree(b); ((void) 0); return (JSIntn)0; } s = buf; if (ilim >= 0 && ilim <= 14 && try_quick) { i = 0; d2 = d; k0 = k; ilim0 = ilim; ieps = 2; if (k > 0) { ds = tens[k&0xf]; j = k >> 4; if (j & 0x10) { j &= 0x10 - 1; d /= bigtens[5 -1]; ieps++; } for(; j; j >>= 1, i++) if (j & 1) { ieps++; ds *= bigtens[i]; } d /= ds; } else if ((j1 = -k) != 0) { d *= tens[j1 & 0xf]; for(j = j1 >> 4; j; j >>= 1, i++) if (j & 1) { ieps++; d *= bigtens[i]; } } if (k_check && d < 1. && ilim > 0) { if (ilim1 <= 0) goto fast_failed; ilim = ilim1; k--; d *= 10.; ieps++; } eps = ieps*d + 7.; (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (eps); sh_u.parts.msw = ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (eps); sh_u.parts.msw; })) - (53 -1)*0x100000); (eps) = sh_u.value; })); if (ilim == 0) { S = mhi = 0; d -= 5.; if (d > eps) goto one_digit; if (d < -eps) goto no_digits; goto fast_failed; } if (leftright) { eps = 0.5/tens[ilim-1] - eps; for(i = 0;;) { L = (int32)d; d -= L; *s++ = '0' + (char)L; if (d < eps) goto ret1; if (1. - d < eps) goto bump_up; if (++i >= ilim) break; eps *= 10.; d *= 10.; } } else { eps *= tens[ilim-1]; for(i = 1;; i++, d *= 10.) { L = (int32)d; d -= L; *s++ = '0' + (char)L; if (i == ilim) { if (d > 0.5 + eps) goto bump_up; else if (d < 0.5 - eps) { while(*--s == '0') ; s++; goto ret1; } break; } } } fast_failed: s = buf; d = d2; k = k0; ilim = ilim0; } if (be >= 0 && k <= 14) { ds = tens[k]; if (ndigits < 0 && ilim <= 0) { S = mhi = 0; if (ilim < 0 || d < 5*ds || (!biasUp && d == 5*ds)) goto no_digits; goto one_digit; } for(i = 1;; i++) { L = (int32) (d / ds); d -= L*ds; *s++ = '0' + (char)L; if (i == ilim) { d += d; if ((d > ds) || (d == ds && (L & 1 || biasUp))) { bump_up: while(*--s == '9') if (s == buf) { k++; *s = '0'; break; } ++*s++; } break; } if (!(d *= 10.)) break; } goto ret1; } m2 = b2; m5 = b5; if (leftright) { if (mode < 2) { i = denorm ? be + (1023 + (53 -1) - 1 + 1) : 1 + 53 - bbits; } else { j = ilim - 1; if (m5 >= j) m5 -= j; else { s5 += j -= m5; b5 += j; m5 = 0; } if ((i = ilim) < 0) { m2 -= i; i = 0; } } b2 += i; s2 += i; mhi = i2b(1); if (!mhi) goto nomem; } if (m2 > 0 && s2 > 0) { i = m2 < s2 ? m2 : s2; b2 -= i; m2 -= i; s2 -= i; } if (b5 > 0) { if (leftright) { if (m5 > 0) { mhi = pow5mult(mhi, m5); if (!mhi) goto nomem; b1 = mult(mhi, b); if (!b1) goto nomem; Bfree(b); b = b1; } if ((j = b5 - m5) != 0) { b = pow5mult(b, j); if (!b) goto nomem; } } else { b = pow5mult(b, b5); if (!b) goto nomem; } } S = i2b(1); if (!S) goto nomem; if (s5 > 0) { S = pow5mult(S, s5); if (!S) goto nomem; } spec_case = 0; if (mode < 2) { if (!(__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) && !((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0xfffff) && (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & (0x7ff00000 & 0x7ff00000 << 1) ) { b2 += 1; s2 += 1; spec_case = 1; } } # 2525 "jsdtoa.c" if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f) != 0) i = 32 - i; if (i > 4) { i -= 4; b2 += i; m2 += i; s2 += i; } else if (i < 4) { i += 28; b2 += i; m2 += i; s2 += i; } if (b2 > 0) { b = lshift(b, b2); if (!b) goto nomem; } if (s2 > 0) { S = lshift(S, s2); if (!S) goto nomem; } if (k_check) { if (cmp(b,S) < 0) { k--; b = multadd(b, 10, 0); if (!b) goto nomem; if (leftright) { mhi = multadd(mhi, 10, 0); if (!mhi) goto nomem; } ilim = ilim1; } } if (ilim <= 0 && mode > 2) { if (ilim < 0) goto no_digits; S = multadd(S,5,0); if (!S) goto nomem; i = cmp(b,S); if (i < 0 || (i == 0 && !biasUp)) { goto no_digits; } one_digit: *s++ = '1'; k++; goto ret; } if (leftright) { if (m2 > 0) { mhi = lshift(mhi, m2); if (!mhi) goto nomem; } mlo = mhi; if (spec_case) { mhi = Balloc(mhi->k); if (!mhi) goto nomem; memcpy((char *)&mhi->sign, (char *)&mlo->sign, mlo->wds*sizeof(int32) + 2*sizeof(int32)); mhi = lshift(mhi, 1); if (!mhi) goto nomem; } for(i = 1;;i++) { dig = quorem(b,S) + '0'; j = cmp(b, mlo); delta = diff(S, mhi); if (!delta) goto nomem; j1 = delta->sign ? 1 : cmp(b, delta); Bfree(delta); if (j1 == 0 && !mode && !((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) & 1)) { if (dig == '9') goto round_9_up; if (j > 0) dig++; *s++ = (char)dig; goto ret; } if ((j < 0) || (j == 0 && !mode && !((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) & 1) )) { if (j1 > 0) { b = lshift(b, 1); if (!b) goto nomem; j1 = cmp(b, S); if (((j1 > 0) || (j1 == 0 && (dig & 1 || biasUp))) && (dig++ == '9')) goto round_9_up; } *s++ = (char)dig; goto ret; } if (j1 > 0) { if (dig == '9') { round_9_up: *s++ = '9'; goto roundoff; } *s++ = dig + 1; goto ret; } *s++ = (char)dig; if (i == ilim) break; b = multadd(b, 10, 0); if (!b) goto nomem; if (mlo == mhi) { mlo = mhi = multadd(mhi, 10, 0); if (!mhi) goto nomem; } else { mlo = multadd(mlo, 10, 0); if (!mlo) goto nomem; mhi = multadd(mhi, 10, 0); if (!mhi) goto nomem; } } } else for(i = 1;; i++) { *s++ = (char)(dig = quorem(b,S) + '0'); if (i >= ilim) break; b = multadd(b, 10, 0); if (!b) goto nomem; } b = lshift(b, 1); if (!b) goto nomem; j = cmp(b, S); if ((j > 0) || (j == 0 && (dig & 1 || biasUp))) { roundoff: while(*--s == '9') if (s == buf) { k++; *s++ = '1'; goto ret; } ++*s++; } else { while(*--s == '0') ; s++; } ret: Bfree(S); if (mhi) { if (mlo && mlo != mhi) Bfree(mlo); Bfree(mhi); } ret1: Bfree(b); ((void) 0); *s = '\0'; if (rve) *rve = s; *decpt = k + 1; return (JSIntn)1; nomem: Bfree(S); if (mhi) { if (mlo && mlo != mhi) Bfree(mlo); Bfree(mhi); } Bfree(b); return (JSIntn)0; } static const int dtoaModes[] = { 0, 0, 3, 2, 2}; char * JS_dtostr(char *buffer, size_t bufferSize, JSDToStrMode mode, int precision, double d) { int decPt; int sign; int nDigits; char *numBegin = buffer+2; char *numEnd; JSBool dtoaRet; ((void) 0); if (mode == DTOSTR_FIXED && (d >= 1e21 || d <= -1e21)) mode = DTOSTR_STANDARD; do { if (!initialized) InitDtoa(); PR_Lock(freelist_lock); } while (0); dtoaRet = js_dtoa(d, dtoaModes[mode], mode >= DTOSTR_FIXED, precision, &decPt, &sign, &numEnd, numBegin, bufferSize-2); PR_Unlock(freelist_lock); if (!dtoaRet) return 0; nDigits = numEnd - numBegin; if (decPt != 9999) { JSBool exponentialNotation = (JSIntn)0; int minNDigits = 0; char *p; char *q; switch (mode) { case DTOSTR_STANDARD: if (decPt < -5 || decPt > 21) exponentialNotation = (JSIntn)1; else minNDigits = decPt; break; case DTOSTR_FIXED: if (precision >= 0) minNDigits = decPt + precision; else minNDigits = decPt; break; case DTOSTR_EXPONENTIAL: ((void) 0); minNDigits = precision; case DTOSTR_STANDARD_EXPONENTIAL: exponentialNotation = (JSIntn)1; break; case DTOSTR_PRECISION: ((void) 0); minNDigits = precision; if (decPt < -5 || decPt > precision) exponentialNotation = (JSIntn)1; break; } if (nDigits < minNDigits) { p = numBegin + minNDigits; nDigits = minNDigits; do { *numEnd++ = '0'; } while (numEnd != p); *numEnd = '\0'; } if (exponentialNotation) { if (nDigits != 1) { numBegin--; numBegin[0] = numBegin[1]; numBegin[1] = '.'; } JS_snprintf(numEnd, bufferSize - (numEnd - buffer), "e%+d", decPt-1); } else if (decPt != nDigits) { ((void) 0); if (decPt > 0) { p = --numBegin; do { *p = p[1]; p++; } while (--decPt); *p = '.'; } else { p = numEnd; numEnd += 1 - decPt; q = numEnd; ((void) 0); *numEnd = '\0'; while (p != numBegin) *--q = *--p; for (p = numBegin + 1; p != q; p++) *p = '0'; *numBegin = '.'; *--numBegin = '0'; } } } if (sign && !((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) == 0x80000000 && (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) == 0) && !(((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0x7ff00000) == 0x7ff00000 && ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) || ((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0xfffff)))) { *--numBegin = '-'; } return numBegin; } static uint32 divrem(Bigint *b, uint32 divisor) { int32 n = b->wds; uint32 remainder = 0; uint32 *bx; uint32 *bp; ((void) 0); if (!n) return 0; bx = b->x; bp = bx + n; do { uint32 a = *--bp; uint32 dividend = remainder << 16 | a >> 16; uint32 quotientHi = dividend / divisor; uint32 quotientLo; remainder = dividend - quotientHi*divisor; ((void) 0); dividend = remainder << 16 | (a & 0xFFFF); quotientLo = dividend / divisor; remainder = dividend - quotientLo*divisor; ((void) 0); *bp = quotientHi << 16 | quotientLo; } while (bp != bx); if (bx[n-1] == 0) b->wds--; return remainder; } # 2919 "jsdtoa.c" char * JS_dtobasestr(int base, double d) { char *buffer; char *p; char *pInt; char *q; uint32 digit; double di; double df; ((void) 0); buffer = (char*) malloc(1078); if (buffer) { p = buffer; if (d < 0.0 ) { *p++ = '-'; d = -d; } if (((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0x7ff00000) == 0x7ff00000) { strcpy(p, !(__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) && !((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0xfffff) ? "Infinity" : "NaN"); return buffer; } do { if (!initialized) InitDtoa(); PR_Lock(freelist_lock); } while (0); pInt = p; di = floor(d); if (di <= 4294967295.0) { uint32 n = (uint32)di; if (n) do { uint32 m = n / base; digit = n - m*base; n = m; ((void) 0); *p++ = ((char)(((digit) >= 10) ? 'a' - 10 + (digit) : '0' + (digit))); } while (n); else *p++ = '0'; } else { int32 e; int32 bits; Bigint *b = d2b(di, &e, &bits); if (!b) goto nomem1; b = lshift(b, e); if (!b) { nomem1: Bfree(b); return ((void *)0); } do { digit = divrem(b, base); ((void) 0); *p++ = ((char)(((digit) >= 10) ? 'a' - 10 + (digit) : '0' + (digit))); } while (b->wds); Bfree(b); } q = p-1; while (q > pInt) { char ch = *pInt; *pInt++ = *q; *q-- = ch; } df = d - di; if (df != 0.0) { int32 e, bbits, s2, done; Bigint *b, *s, *mlo, *mhi; b = s = mlo = mhi = ((void *)0); *p++ = '.'; b = d2b(df, &e, &bbits); if (!b) { nomem2: Bfree(b); Bfree(s); if (mlo != mhi) Bfree(mlo); Bfree(mhi); return ((void *)0); } ((void) 0); s2 = -(int32)((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) >> 20 & 0x7ff00000>>20); if (!s2) s2 = -1; s2 += 1023 + 53; ((void) 0); mlo = i2b(1); if (!mlo) goto nomem2; mhi = mlo; if (!(__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) && !((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & 0xfffff) && (__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.msw; })) & (0x7ff00000 & 0x7ff00000 << 1) ) { s2 += 1; mhi = i2b(1<<1); if (!mhi) goto nomem2; } b = lshift(b, e + s2); if (!b) goto nomem2; s = i2b(1); if (!s) goto nomem2; s = lshift(s, s2); if (!s) goto nomem2; done = (JSIntn)0; do { int32 j, j1; Bigint *delta; b = multadd(b, base, 0); if (!b) goto nomem2; digit = quorem2(b, s2); if (mlo == mhi) { mlo = mhi = multadd(mlo, base, 0); if (!mhi) goto nomem2; } else { mlo = multadd(mlo, base, 0); if (!mlo) goto nomem2; mhi = multadd(mhi, base, 0); if (!mhi) goto nomem2; } j = cmp(b, mlo); delta = diff(s, mhi); if (!delta) goto nomem2; j1 = delta->sign ? 1 : cmp(b, delta); Bfree(delta); if (j1 == 0 && !((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) & 1)) { if (j > 0) digit++; done = (JSIntn)1; } else if (j < 0 || (j == 0 && !((__extension__ ({ js_ieee_double_shape_type sh_u; sh_u.value = (d); sh_u.parts.lsw; })) & 1) )) { if (j1 > 0) { b = lshift(b, 1); if (!b) goto nomem2; j1 = cmp(b, s); if (j1 > 0) digit++; } done = (JSIntn)1; } else if (j1 > 0) { digit++; done = (JSIntn)1; } ((void) 0); *p++ = ((char)(((digit) >= 10) ? 'a' - 10 + (digit) : '0' + (digit))); } while (!done); Bfree(b); Bfree(s); if (mlo != mhi) Bfree(mlo); Bfree(mhi); } ((void) 0); *p = '\0'; PR_Unlock(freelist_lock); } return buffer; } >Fix: compile with -march=i686 -mcpu=i686 instead of -march=pentium4 -mcpu=pentium4 >Release-Note: >Audit-Trail: >Unformatted: