[webkit-changes] cvs commit: JavaScriptCore/kjs collector.cpp config.h date_object.cpp identifier.cpp internal.cpp internal.h protected_values.cpp

Maciej mjs at opensource.apple.com
Mon Oct 3 18:43:59 PDT 2005


mjs         05/10/03 18:43:59

  Modified:    .        ChangeLog
               kjs      collector.cpp config.h date_object.cpp
                        identifier.cpp internal.cpp internal.h
                        protected_values.cpp
  Log:
          Patch from George Staikos <staikos at kde.org>, reviewed and tweaked a bit by me.
  
  	http://bugzilla.opendarwin.org/show_bug.cgi?id=5174
  	Add support for compiling on Linux (likely to help for other POSIX systems too)
  
          * kjs/collector.cpp:
          (KJS::Collector::markCurrentThreadConservatively):
          (KJS::Collector::markOtherThreadConservatively):
          * kjs/config.h:
          * kjs/date_object.cpp:
          (KJS::formatDate):
          (KJS::formatDateUTCVariant):
          (KJS::formatTime):
          (KJS::timeZoneOffset):
          (KJS::DateProtoFuncImp::callAsFunction):
          (KJS::DateObjectImp::construct):
          (KJS::DateObjectImp::callAsFunction):
          (KJS::makeTime):
          * kjs/identifier.cpp:
          * kjs/internal.cpp:
          (KJS::initializeInterpreterLock):
          (KJS::lockInterpreter):
          (KJS::unlockInterpreter):
          (KJS::UndefinedImp::toPrimitive):
          (KJS::UndefinedImp::toBoolean):
          (KJS::UndefinedImp::toNumber):
          (KJS::UndefinedImp::toString):
          (KJS::NullImp::toPrimitive):
          (KJS::NullImp::toBoolean):
          (KJS::NullImp::toNumber):
          (KJS::NullImp::toString):
          (KJS::BooleanImp::toPrimitive):
          (KJS::BooleanImp::toBoolean):
          (KJS::BooleanImp::toNumber):
          (KJS::BooleanImp::toString):
          (KJS::StringImp::toPrimitive):
          (KJS::StringImp::toBoolean):
          (KJS::StringImp::toNumber):
          (KJS::StringImp::toString):
          * kjs/internal.h:
          * kjs/protected_values.cpp:
  
  Revision  Changes    Path
  1.851     +44 -0     JavaScriptCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
  retrieving revision 1.850
  retrieving revision 1.851
  diff -u -r1.850 -r1.851
  --- ChangeLog	3 Oct 2005 22:42:25 -0000	1.850
  +++ ChangeLog	4 Oct 2005 01:43:57 -0000	1.851
  @@ -1,5 +1,49 @@
   2005-10-03  Maciej Stachowiak  <mjs at apple.com>
   
  +        Patch from George Staikos <staikos at kde.org>, reviewed and tweaked a bit by me.
  +
  +	http://bugzilla.opendarwin.org/show_bug.cgi?id=5174
  +	Add support for compiling on Linux (likely to help for other POSIX systems too)
  +
  +        * kjs/collector.cpp:
  +        (KJS::Collector::markCurrentThreadConservatively):
  +        (KJS::Collector::markOtherThreadConservatively):
  +        * kjs/config.h:
  +        * kjs/date_object.cpp:
  +        (KJS::formatDate):
  +        (KJS::formatDateUTCVariant):
  +        (KJS::formatTime):
  +        (KJS::timeZoneOffset):
  +        (KJS::DateProtoFuncImp::callAsFunction):
  +        (KJS::DateObjectImp::construct):
  +        (KJS::DateObjectImp::callAsFunction):
  +        (KJS::makeTime):
  +        * kjs/identifier.cpp:
  +        * kjs/internal.cpp:
  +        (KJS::initializeInterpreterLock):
  +        (KJS::lockInterpreter):
  +        (KJS::unlockInterpreter):
  +        (KJS::UndefinedImp::toPrimitive):
  +        (KJS::UndefinedImp::toBoolean):
  +        (KJS::UndefinedImp::toNumber):
  +        (KJS::UndefinedImp::toString):
  +        (KJS::NullImp::toPrimitive):
  +        (KJS::NullImp::toBoolean):
  +        (KJS::NullImp::toNumber):
  +        (KJS::NullImp::toString):
  +        (KJS::BooleanImp::toPrimitive):
  +        (KJS::BooleanImp::toBoolean):
  +        (KJS::BooleanImp::toNumber):
  +        (KJS::BooleanImp::toString):
  +        (KJS::StringImp::toPrimitive):
  +        (KJS::StringImp::toBoolean):
  +        (KJS::StringImp::toNumber):
  +        (KJS::StringImp::toString):
  +        * kjs/internal.h:
  +        * kjs/protected_values.cpp:
  +
  +2005-10-03  Maciej Stachowiak  <mjs at apple.com>
  +
           - fix Development build after last checkin
   
           * kxmlcore/FastMalloc.cpp:
  
  
  
  1.49      +21 -8     JavaScriptCore/kjs/collector.cpp
  
  Index: collector.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/collector.cpp,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- collector.cpp	3 Oct 2005 21:11:48 -0000	1.48
  +++ collector.cpp	4 Oct 2005 01:43:58 -0000	1.49
  @@ -31,7 +31,7 @@
   #include <setjmp.h>
   #include <algorithm>
   
  -#if !WIN32
  +#if __APPLE__
   
   #include <CoreFoundation/CoreFoundation.h>
   #include <pthread.h>
  @@ -39,10 +39,14 @@
   #include <mach/task.h>
   #include <mach/thread_act.h>
   
  -#else
  +#elif WIN32
   
   #include <windows.h>
   
  +#else
  +
  +#include <pthread.h>
  +
   #endif
   
   using std::max;
  @@ -291,16 +295,25 @@
       jmp_buf registers;
       setjmp(registers);
   
  -#if !WIN32
  +#if __APPLE__
       pthread_t thread = pthread_self();
       void *stackBase = pthread_get_stackaddr_np(thread);
  -#else
  +#elif WIN32
       NT_TIB *pTib;
       __asm {
           MOV EAX, FS:[18h]
           MOV pTib, EAX
       }
       void *stackBase = (void *)pTib->StackBase;
  +#else
  +    void *stackBase = 0;
  +    pthread_attr_t sattr;
  +    // FIXME: this function is non-portable; other POSIX systems may have different np alternatives
  +    pthread_getattr_np(pthread_self(), &sattr);
  +    // Should work but fails on Linux (?)
  +    //  pthread_attr_getstack(&sattr, &stackBase, &stackSize);
  +    pthread_attr_getstackaddr(&sattr, &stackBase);
  +    assert(stackBase);
   #endif
   
       int dummy;
  @@ -317,15 +330,15 @@
   {
     thread_suspend(thread->machThread);
   
  -#if defined(__i386__)
  +#if __i386__
     i386_thread_state_t regs;
     unsigned user_count = sizeof(regs)/sizeof(int);
     thread_state_flavor_t flavor = i386_THREAD_STATE;
  -#elif defined(__ppc__)
  +#elif __ppc__
     ppc_thread_state_t  regs;
     unsigned user_count = PPC_THREAD_STATE_COUNT;
     thread_state_flavor_t flavor = PPC_THREAD_STATE;
  -#elif defined(__ppc64__)
  +#elif __ppc64__
     ppc_thread_state64_t  regs;
     unsigned user_count = PPC_THREAD_STATE64_COUNT;
     thread_state_flavor_t flavor = PPC_THREAD_STATE64;
  @@ -339,7 +352,7 @@
     markStackObjectsConservatively((void *)&regs, (void *)((char *)&regs + (user_count * sizeof(usword_t))));
     
     // scan the stack
  -#if defined(__i386__)
  +#if __i386__
     markStackObjectsConservatively((void *)regs.esp, pthread_get_stackaddr_np(thread->posixThread));
   #elif defined(__ppc__) || defined(__ppc64__)
     markStackObjectsConservatively((void *)regs.r1, pthread_get_stackaddr_np(thread->posixThread));
  
  
  
  1.11      +12 -2     JavaScriptCore/kjs/config.h
  
  Index: config.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/config.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- config.h	3 Oct 2005 21:11:48 -0000	1.10
  +++ config.h	4 Oct 2005 01:43:58 -0000	1.11
  @@ -1,4 +1,4 @@
  -#if !WIN32
  +#if __APPLE__
   
   #define HAVE_FUNC_ISINF 1
   #define HAVE_FUNC_ISNAN 1
  @@ -7,12 +7,22 @@
   #define HAVE_SYS_TIME_H 1
   #define TIME_WITH_SYS_TIME 1
   
  -#else
  +#elif WIN32
   
   #define HAVE_FLOAT_H 1
   #define HAVE_FUNC__FINITE 1
   #define HAVE_SYS_TIMEB_H 1
   
  +#else
  +
  +#define HAVE_FUNC_ISINF 1
  +#define HAVE_FUNC_ISNAN 1
  +#define HAVE_STRINGS_H 1
  +#define HAVE_SYS_PARAM_H 1
  +#define HAVE_SYS_TIME_H 1
  +#define TIME_WITH_SYS_TIME 1
  +#define HAVE_ERRNO_H 1
  +
   #endif
   
   #define HAVE_FUNC_STRTOLL 1
  
  
  
  1.59      +65 -86    JavaScriptCore/kjs/date_object.cpp
  
  Index: date_object.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/date_object.cpp,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- date_object.cpp	30 Sep 2005 16:16:13 -0000	1.58
  +++ date_object.cpp	4 Oct 2005 01:43:58 -0000	1.59
  @@ -20,9 +20,7 @@
    *
    */
   
  -#ifdef HAVE_CONFIG_H
  -#include <config.h>
  -#endif
  +#include "config.h"
   #ifndef HAVE_SYS_TIMEB_H
   #define HAVE_SYS_TIMEB_H 0
   #endif
  @@ -41,6 +39,10 @@
   #include <sys/timeb.h>
   #endif
   
  +#ifdef HAVE_ERRNO_H
  +#include <errno.h>
  +#endif
  +
   #ifdef HAVE_SYS_PARAM_H
   #  include <sys/param.h>
   #endif // HAVE_SYS_PARAM_H
  @@ -75,8 +77,10 @@
   const double msPerMinute = msPerSecond * secondsPerMinute;
   const double msPerHour = msPerMinute * minutesPerHour;
   const double msPerDay = msPerHour * hoursPerDay;
  -
  -#if APPLE_CHANGES
  +static const char * const weekdayName[7] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
  +static const char * const monthName[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
  +    
  +#ifdef APPLE_CHANGES
   
   // Originally, we wrote our own implementation that uses Core Foundation because of a performance problem in Mac OS X 10.2.
   // But we need to keep using this rather than the standard library functions because this handles a larger range of dates.
  @@ -96,9 +100,6 @@
   #define ctime(x) NotAllowedToCallThis()
   #define strftime(a, b, c, d) NotAllowedToCallThis()
   
  -static const char * const weekdayName[7] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
  -static const char * const monthName[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
  -    
   static struct tm *tmUsingCF(time_t clock, CFTimeZoneRef timeZone)
   {
       static struct tm result;
  @@ -224,41 +225,6 @@
       return result;
   }
   
  -static UString formatDate(struct tm &tm)
  -{
  -    char buffer[100];
  -    snprintf(buffer, sizeof(buffer), "%s %s %02d %04d",
  -        weekdayName[(tm.tm_wday + 6) % 7],
  -        monthName[tm.tm_mon], tm.tm_mday, tm.tm_year + 1900);
  -    return buffer;
  -}
  -
  -static UString formatDateUTCVariant(struct tm &tm)
  -{
  -    char buffer[100];
  -    snprintf(buffer, sizeof(buffer), "%s, %02d %s %04d",
  -        weekdayName[(tm.tm_wday + 6) % 7],
  -        tm.tm_mday, monthName[tm.tm_mon], tm.tm_year + 1900);
  -    return buffer;
  -}
  -
  -static UString formatTime(struct tm &tm)
  -{
  -    char buffer[100];
  -    if (tm.tm_gmtoff == 0) {
  -        snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d GMT", tm.tm_hour, tm.tm_min, tm.tm_sec);
  -    } else {
  -        int offset = tm.tm_gmtoff;
  -        if (offset < 0) {
  -            offset = -offset;
  -        }
  -        snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d GMT%c%02d%02d",
  -            tm.tm_hour, tm.tm_min, tm.tm_sec,
  -            tm.tm_gmtoff < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60);
  -    }
  -    return UString(buffer);
  -}
  -
   static CFDateFormatterStyle styleFromArgString(const UString& string,CFDateFormatterStyle defaultStyle)
   {
       CFDateFormatterStyle retVal = defaultStyle;
  @@ -326,6 +292,41 @@
   
   namespace KJS {
   
  +static UString formatDate(struct tm &tm)
  +{
  +    char buffer[100];
  +    snprintf(buffer, sizeof(buffer), "%s %s %02d %04d",
  +        weekdayName[(tm.tm_wday + 6) % 7],
  +        monthName[tm.tm_mon], tm.tm_mday, tm.tm_year + 1900);
  +    return buffer;
  +}
  +
  +static UString formatDateUTCVariant(struct tm &tm)
  +{
  +    char buffer[100];
  +    snprintf(buffer, sizeof(buffer), "%s, %02d %s %04d",
  +        weekdayName[(tm.tm_wday + 6) % 7],
  +        tm.tm_mday, monthName[tm.tm_mon], tm.tm_year + 1900);
  +    return buffer;
  +}
  +
  +static UString formatTime(struct tm &tm)
  +{
  +    char buffer[100];
  +    if (tm.tm_gmtoff == 0) {
  +        snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d GMT", tm.tm_hour, tm.tm_min, tm.tm_sec);
  +    } else {
  +        int offset = tm.tm_gmtoff;
  +        if (offset < 0) {
  +            offset = -offset;
  +        }
  +        snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d GMT%c%02d%02d",
  +            tm.tm_hour, tm.tm_min, tm.tm_sec,
  +            tm.tm_gmtoff < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60);
  +    }
  +    return UString(buffer);
  +}
  +
   static int day(double t)
   {
     return int(floor(t / msPerDay));
  @@ -388,7 +389,7 @@
   
   static long timeZoneOffset(const struct tm *t)
   {
  -#if defined BSD || defined(__linux__) || defined(__APPLE__)
  +#if !defined(WIN32)
     return -(t->tm_gmtoff / 60);
   #else
   #  if defined(__BORLANDC__) || defined(__CYGWIN__)
  @@ -582,7 +583,7 @@
   
     ValueImp *result = NULL;
     UString s;
  -#if !APPLE_CHANGES
  +#if !defined(APPLE_CHANGES) || !APPLE_CHANGES
     const int bufsize=100;
     char timebuffer[bufsize];
     CString oldlocale = setlocale(LC_TIME,NULL);
  @@ -591,7 +592,6 @@
   #endif
     ValueImp *v = thisObj->internalValue();
     double milli = v->toNumber(exec);
  -  
     if (isNaN(milli)) {
       switch (id) {
         case ToString:
  @@ -637,6 +637,7 @@
     time_t tv = (time_t) floor(milli / 1000.0);
     double ms = milli - tv * 1000.0;
   
  +  // FIXME: not threadsafe (either of these options)
     struct tm *t = utc ? gmtime(&tv) : localtime(&tv);
     // we had an out of range year. use that one (plus/minus offset
     // found by calculating tm_year) and fix the week day calculation
  @@ -649,9 +650,8 @@
         m -= timeZoneOffset(t) * msPerMinute;
       t->tm_wday = weekDay(m);
     }
  -  
  + 
     switch (id) {
  -#if APPLE_CHANGES
     case ToString:
       result = String(formatDate(*t) + " " + formatTime(*t));
       break;
  @@ -665,6 +665,7 @@
     case ToUTCString:
       result = String(formatDateUTCVariant(*t) + " " + formatTime(*t));
       break;
  +#if APPLE_CHANGES
     case ToLocaleString:
       result = String(formatLocaleDate(exec, secs, true, true, args));
       break;
  @@ -675,25 +676,6 @@
       result = String(formatLocaleDate(exec, secs, false, true, args));
       break;
   #else
  -  case ToString:
  -    s = ctime(&tv);
  -    result = String(s.substr(0, s.size() - 1));
  -    break;
  -  case ToDateString:
  -  case ToTimeString:
  -  case ToGMTString:
  -  case ToUTCString:
  -    setlocale(LC_TIME,"C");
  -    if (id == DateProtoFuncImp::ToDateString) {
  -      strftime(timebuffer, bufsize, "%x",t);
  -    } else if (id == DateProtoFuncImp::ToTimeString) {
  -      strftime(timebuffer, bufsize, "%X",t);
  -    } else { // toGMTString & toUTCString
  -      strftime(timebuffer, bufsize, "%a, %d %b %Y %H:%M:%S %Z", t);
  -    }
  -    setlocale(LC_TIME,oldlocale.c_str());
  -    result = String(timebuffer);
  -    break;
     case ToLocaleString:
       strftime(timebuffer, bufsize, "%c", t);
       result = String(timebuffer);
  @@ -745,9 +727,7 @@
       result = Number(ms);
       break;
     case GetTimezoneOffset:
  -#if defined BSD || defined(__APPLE__)
  -    result = Number(-t->tm_gmtoff / 60);
  -#else
  +#if WIN32
   #  if defined(__BORLANDC__)
   #error please add daylight savings offset here!
       // FIXME: Using the daylight value was wrong for BSD, maybe wrong here too.
  @@ -756,6 +736,8 @@
       // FIXME: Using the daylight value was wrong for BSD, maybe wrong here too.
       result = Number(( timezone / 60 - ( daylight ? 60 : 0 )));
   #  endif
  +#else
  +    result = Number(-t->tm_gmtoff / 60);
   #endif
       break;
     case SetTime:
  @@ -847,6 +829,7 @@
       double utc = floor((double)timebuffer.time * 1000.0 + (double)timebuffer.millitm);
   #else
       struct timeval tv;
  +    // FIXME: not threadsafe
       gettimeofday(&tv, 0L);
       double utc = floor((double)tv.tv_sec * 1000.0 + (double)tv.tv_usec / 1000.0);
   #endif
  @@ -892,18 +875,12 @@
   }
   
   // ECMA 15.9.2
  -ValueImp *DateObjectImp::callAsFunction(ExecState */*exec*/, ObjectImp */*thisObj*/, const List &/*args*/)
  +ValueImp *DateObjectImp::callAsFunction(ExecState * /*exec*/, ObjectImp * /*thisObj*/, const List &/*args*/)
   {
     time_t t = time(0L);
  -#if APPLE_CHANGES
  +  // FIXME: not threadsafe
     struct tm *tm = localtime(&t);
     return String(formatDate(*tm) + " " + formatTime(*tm));
  -#else
  -  UString s(ctime(&t));
  -
  -  // return formatted string minus trailing \n
  -  return String(s.substr(0, s.size() - 1));
  -#endif
   }
   
   // ------------------------------ DateObjectFuncImp ----------------------------
  @@ -1010,12 +987,8 @@
       int utcOffset;
       if (utc) {
           time_t zero = 0;
  -#if defined BSD || defined(__linux__) || defined(__APPLE__)
  -        struct tm t3;
  -        localtime_r(&zero, &t3);
  -        utcOffset = t3.tm_gmtoff;
  -        t->tm_isdst = t3.tm_isdst;
  -#else
  +#if defined(WIN32)
  +        // FIXME: not threadsafe
           (void)localtime(&zero);
   #  if defined(__BORLANDC__) || defined(__CYGWIN__)
           utcOffset = - _timezone;
  @@ -1023,17 +996,23 @@
           utcOffset = - timezone;
   #  endif
           t->tm_isdst = 0;
  +#else
  +        struct tm t3;
  +        localtime_r(&zero, &t3);
  +        utcOffset = t3.tm_gmtoff;
  +        t->tm_isdst = t3.tm_isdst;
   #endif
       } else {
           utcOffset = 0;
           t->tm_isdst = -1;
       }
  -    
  +
  +#ifdef __APPLE__
       // t->tm_year must hold the bulk of the data to avoid overflow when converting
       // to a CFGregorianDate. (CFGregorianDate.month is an SInt8; CFGregorianDate.year is an SInt32.)
       t->tm_year += t->tm_mon / 12;
       t->tm_mon %= 12;
  -    
  +#endif    
   
       double yearOffset = 0.0;
       if (t->tm_year < (1970 - 1900) || t->tm_year > (2038 - 1900)) {
  
  
  
  1.22      +1 -1      JavaScriptCore/kjs/identifier.cpp
  
  Index: identifier.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/identifier.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- identifier.cpp	3 Oct 2005 21:11:49 -0000	1.21
  +++ identifier.cpp	4 Oct 2005 01:43:58 -0000	1.22
  @@ -25,7 +25,7 @@
   // portable, and it would be good to figure out a 100% clean way that still avoids code that
   // runs at init time.
   
  -#if !WIN32 // can't get this to compile on Visual C++ yet
  +#if !defined(WIN32) // can't get this to compile on Visual C++ yet
   #define AVOID_STATIC_CONSTRUCTORS 1
   #endif
   
  
  
  
  1.76      +25 -25    JavaScriptCore/kjs/internal.cpp
  
  Index: internal.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/internal.cpp,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- internal.cpp	3 Oct 2005 21:11:49 -0000	1.75
  +++ internal.cpp	4 Oct 2005 01:43:58 -0000	1.76
  @@ -74,15 +74,7 @@
    
   #endif // APPLE_CHANGES
   
  -#if !KJS_MULTIPLE_THREADS
  -
  -static inline void initializeInterpreterLock() { }
  -static inline void lockInterpreter() { }
  -static inline void unlockInterpreter() { }
  -
  -const int interpreterLockCount = 1;
  -
  -#else
  +#if defined(KJS_MULTIPLE_THREADS) && KJS_MULTIPLE_THREADS
   
   static pthread_once_t interpreterLockOnce = PTHREAD_ONCE_INIT;
   static pthread_mutex_t interpreterLock;
  @@ -112,26 +104,34 @@
     pthread_mutex_unlock(&interpreterLock);
   }
   
  +#else
  +
  +static inline void initializeInterpreterLock() { }
  +static inline void lockInterpreter() { }
  +static inline void unlockInterpreter() { }
  +
  +const int interpreterLockCount = 1;
  +
   #endif
   
   // ------------------------------ UndefinedImp ---------------------------------
   
  -ValueImp *UndefinedImp::toPrimitive(ExecState */*exec*/, Type) const
  +ValueImp *UndefinedImp::toPrimitive(ExecState *, Type) const
   {
     return const_cast<UndefinedImp *>(this);
   }
   
  -bool UndefinedImp::toBoolean(ExecState */*exec*/) const
  +bool UndefinedImp::toBoolean(ExecState *) const
   {
     return false;
   }
   
  -double UndefinedImp::toNumber(ExecState */*exec*/) const
  +double UndefinedImp::toNumber(ExecState *) const
   {
     return NaN;
   }
   
  -UString UndefinedImp::toString(ExecState */*exec*/) const
  +UString UndefinedImp::toString(ExecState *) const
   {
     return "undefined";
   }
  @@ -143,22 +143,22 @@
   
   // ------------------------------ NullImp --------------------------------------
   
  -ValueImp *NullImp::toPrimitive(ExecState */*exec*/, Type) const
  +ValueImp *NullImp::toPrimitive(ExecState *, Type) const
   {
     return const_cast<NullImp *>(this);
   }
   
  -bool NullImp::toBoolean(ExecState */*exec*/) const
  +bool NullImp::toBoolean(ExecState *) const
   {
     return false;
   }
   
  -double NullImp::toNumber(ExecState */*exec*/) const
  +double NullImp::toNumber(ExecState *) const
   {
     return 0.0;
   }
   
  -UString NullImp::toString(ExecState */*exec*/) const
  +UString NullImp::toString(ExecState *) const
   {
     return "null";
   }
  @@ -170,22 +170,22 @@
   
   // ------------------------------ BooleanImp -----------------------------------
   
  -ValueImp *BooleanImp::toPrimitive(ExecState */*exec*/, Type) const
  +ValueImp *BooleanImp::toPrimitive(ExecState *, Type) const
   {
     return const_cast<BooleanImp *>(this);
   }
   
  -bool BooleanImp::toBoolean(ExecState */*exec*/) const
  +bool BooleanImp::toBoolean(ExecState *) const
   {
     return val;
   }
   
  -double BooleanImp::toNumber(ExecState */*exec*/) const
  +double BooleanImp::toNumber(ExecState *) const
   {
     return val ? 1.0 : 0.0;
   }
   
  -UString BooleanImp::toString(ExecState */*exec*/) const
  +UString BooleanImp::toString(ExecState *) const
   {
     return val ? "true" : "false";
   }
  @@ -199,22 +199,22 @@
   
   // ------------------------------ StringImp ------------------------------------
   
  -ValueImp *StringImp::toPrimitive(ExecState */*exec*/, Type) const
  +ValueImp *StringImp::toPrimitive(ExecState *, Type) const
   {
     return const_cast<StringImp *>(this);
   }
   
  -bool StringImp::toBoolean(ExecState */*exec*/) const
  +bool StringImp::toBoolean(ExecState *) const
   {
     return (val.size() > 0);
   }
   
  -double StringImp::toNumber(ExecState */*exec*/) const
  +double StringImp::toNumber(ExecState *) const
   {
     return val.toDouble();
   }
   
  -UString StringImp::toString(ExecState */*exec*/) const
  +UString StringImp::toString(ExecState *) const
   {
     return val;
   }
  
  
  
  1.42      +1 -1      JavaScriptCore/kjs/internal.h
  
  Index: internal.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/internal.h,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- internal.h	27 Sep 2005 22:36:49 -0000	1.41
  +++ internal.h	4 Oct 2005 01:43:58 -0000	1.42
  @@ -34,7 +34,7 @@
   #include "scope_chain.h"
   #include <kxmlcore/SharedPtr.h>
   
  -#if !WIN32
  +#if __APPLE__
   #define KJS_MULTIPLE_THREADS 1
   #endif
   
  
  
  
  1.8       +1 -0      JavaScriptCore/kjs/protected_values.cpp
  
  Index: protected_values.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/protected_values.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- protected_values.cpp	3 Oct 2005 21:11:51 -0000	1.7
  +++ protected_values.cpp	4 Oct 2005 01:43:58 -0000	1.8
  @@ -27,6 +27,7 @@
   #include "simple_number.h"
   #include "internal.h"
   #include <stdint.h>
  +#include <stdlib.h>
   #include "value.h"
   
   namespace KJS {
  
  
  



More information about the webkit-changes mailing list