Changeset 21064 in webkit for trunk/JavaScriptCore/kjs/dtoa.cpp


Ignore:
Timestamp:
Apr 24, 2007, 1:44:14 AM (18 years ago)
Author:
mjs
Message:

Reviewed by Geoff.


  • compile most of JavaScriptCore as one file for 4% JS iBench speed improvement
  • JavaScriptCore.xcodeproj/project.pbxproj: Add AllInOneFile.cpp, and remove files it includes from the build.
  • kjs/AllInOneFile.cpp: Added.
  • kjs/dtoa.cpp: Renamed CONST to CONST_ to avoid conflict. (Bigint::): (Bigint::nrv_alloc):
  • kjs/lookup.cpp: Use "namspace KJS { ... }" instead of "using namespace KJS;"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/dtoa.cpp

    r19136 r21064  
    281281#endif
    282282
    283 #ifndef CONST
     283#ifndef CONST_
    284284#ifdef KR_headers
    285 #define CONST /* blank */
    286 #else
    287 #define CONST const
     285#define CONST_ /* blank */
     286#else
     287#define CONST_ const
    288288#endif
    289289#endif
     
    628628s2b
    629629#ifdef KR_headers
    630         (s, nd0, nd, y9) CONST char *s; int nd0, nd; ULong y9;
    631 #else
    632         (CONST char *s, int nd0, int nd, ULong y9)
     630        (s, nd0, nd, y9) CONST_ char *s; int nd0, nd; ULong y9;
     631#else
     632        (CONST_ char *s, int nd0, int nd, ULong y9)
    633633#endif
    634634{
     
    14091409        }
    14101410
    1411  static CONST double
     1411 static CONST_ double
    14121412tens[] = {
    14131413                1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
     
    14191419                };
    14201420
    1421  static CONST double
     1421 static CONST_ double
    14221422#ifdef IEEE_Arith
    14231423bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
    1424 static CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128,
     1424static CONST_ double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128,
    14251425#ifdef Avoid_Underflow
    14261426                9007199254740992.*9007199254740992.e-256
     
    14371437#ifdef IBM
    14381438bigtens[] = { 1e16, 1e32, 1e64 };
    1439 static CONST double tinytens[] = { 1e-16, 1e-32, 1e-64 };
     1439static CONST_ double tinytens[] = { 1e-16, 1e-32, 1e-64 };
    14401440#define n_bigtens 3
    14411441#else
    14421442bigtens[] = { 1e16, 1e32 };
    1443 static CONST double tinytens[] = { 1e-16, 1e-32 };
     1443static CONST_ double tinytens[] = { 1e-16, 1e-32 };
    14441444#define n_bigtens 2
    14451445#endif
     
    14651465        (sp, t) char **sp, *t;
    14661466#else
    1467         (CONST char **sp, CONST char *t)
     1467        (CONST_ char **sp, CONST_ char *t)
    14681468#endif
    14691469{
    14701470        int c, d;
    1471         CONST char *s = *sp;
     1471        CONST_ char *s = *sp;
    14721472
    14731473        while((d = *t++)) {
     
    14851485hexnan
    14861486#ifdef KR_headers
    1487         (rvp, sp) double *rvp; CONST char **sp;
    1488 #else
    1489         (double *rvp, CONST char **sp)
     1487        (rvp, sp) double *rvp; CONST_ char **sp;
     1488#else
     1489        (double *rvp, CONST_ char **sp)
    14901490#endif
    14911491{
    14921492        ULong c, x[2];
    1493         CONST char *s;
     1493        CONST_ char *s;
    14941494        int havedig, udx0, xshift;
    14951495
     
    14981498        udx0 = 1;
    14991499        s = *sp;
    1500         while((c = *(CONST unsigned char*)++s)) {
     1500        while((c = *(CONST_ unsigned char*)++s)) {
    15011501                if (c >= '0' && c <= '9')
    15021502                        c -= '0';
     
    15391539strtod
    15401540#ifdef KR_headers
    1541         (s00, se) CONST char *s00; char **se;
    1542 #else
    1543         (CONST char *s00, char **se)
     1541        (s00, se) CONST_ char *s00; char **se;
     1542#else
     1543        (CONST_ char *s00, char **se)
    15441544#endif
    15451545{
     
    15491549        int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
    15501550                 e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
    1551         CONST char *s, *s0, *s1;
     1551        CONST_ char *s, *s0, *s1;
    15521552        double aadj, aadj1, adj, rv, rv0;
    15531553        Long L;
     
    15611561#endif
    15621562#ifdef USE_LOCALE
    1563         CONST char *s2;
     1563        CONST_ char *s2;
    15641564#endif
    15651565
     
    25752575nrv_alloc(s, rve, n) char *s, **rve; int n;
    25762576#else
    2577 nrv_alloc(CONST char *s, char **rve, int n)
     2577nrv_alloc(CONST_ char *s, char **rve, int n)
    25782578#endif
    25792579{
Note: See TracChangeset for help on using the changeset viewer.