Ignore:
Timestamp:
Mar 28, 2006, 4:09:20 PM (19 years ago)
Author:
darin
Message:

Reviewed by Geoff.

  • change some code that resulted in init routines on Mac OS X -- if the framework has init routines it will use memory and slow down applications that link with WebKit even in cases where those applications don't use WebKit
  • kjs/date_object.cpp: Changed constants that were derived by multiplying other constants to use immediate numbers instead. Apparently, double constant expressions of the type we had here are evaluated at load time.
  • kjs/list.cpp: Can't use OwnArrayPtr in ListImp because of the global instances of ListImp, so go back to using a plain old pointer. (KJS::List::List): Set overflow to 0 when initializing ListImp. (KJS::List::release): Replace a clear call with a delete and explicit set to 0. (KJS::List::append): Use raw pointers, and do a delete [] instead of finessing it with a swap of OwnArrayPtr. (KJS::List::copyFrom): Remove now-unneeded get(). (KJS::List::copyTail): Ditto.
  • kjs/ustring.cpp: Changed UString::Rep::empty initializer a bit so that it doesn't get a static initializer routine. Had to get rid of one level of constant to get the compiler to understand it could initialize without any code.
  • added a build step that checks for init routines
  • JavaScriptCore.xcodeproj/project.pbxproj: Deleted now-unused custom build rule that was replaced by the generate-derived-sources script a while back. Added a custom build phase that invokes the check-for-global-initializers script.
File:
1 edited

Legend:

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

    r13318 r13541  
    131131const double secondsPerMinute = 60;
    132132const double msPerSecond = 1000;
    133 const double msPerMinute = msPerSecond * secondsPerMinute;
    134 const double msPerHour = msPerMinute * minutesPerHour;
    135 const double msPerDay = msPerHour * hoursPerDay;
     133const double msPerMinute = 60 * 1000;
     134const double msPerHour = 60 * 60 * 1000;
     135const double msPerDay = 24 * 60 * 60 * 1000;
     136
    136137static const char * const weekdayName[7] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
    137138static const char * const monthName[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
    138    
     139
    139140static double makeTime(tm *, double ms, bool utc);
    140141static double parseDate(const UString &);
Note: See TracChangeset for help on using the changeset viewer.