-
ap@webkit.org authored
Cache Gregorian date/time structure on DateInstance objects for 1.027x SunSpider speedup (1.65x on date-format-xparb, 1.13x on date-format-tofte). * kjs/DateMath.h: (KJS::GregorianDateTime::copyFrom): Added. It presumably makes sense to keep GregorianDateTime Noncopiable, so it's not just operator=. * kjs/date_object.h: Added a per-object cache. * kjs/date_object.cpp: (KJS::DateInstance::DateInstance): (KJS::DateInstance::msToGregorianDateTime): (KJS::dateProtoFuncToString): (KJS::dateProtoFuncToUTCString): (KJS::dateProtoFuncToDateString): (KJS::dateProtoFuncToTimeString): (KJS::dateProtoFuncToLocaleString): (KJS::dateProtoFuncToLocaleDateString): (KJS::dateProtoFuncToLocaleTimeString): (KJS::dateProtoFuncGetFullYear): (KJS::dateProtoFuncGetUTCFullYear): (KJS::dateProtoFuncToGMTString): (KJS::dateProtoFuncGetMonth): (KJS::dateProtoFuncGetUTCMonth): (KJS::dateProtoFuncGetDate): (KJS::dateProtoFuncGetUTCDate): (KJS::dateProtoFuncGetDay): (KJS::dateProtoFuncGetUTCDay): (KJS::dateProtoFuncGetHours): (KJS::dateProtoFuncGetUTCHours): (KJS::dateProtoFuncGetMinutes): (KJS::dateProtoFuncGetUTCMinutes): (KJS::dateProtoFuncGetSeconds): (KJS::dateProtoFuncGetUTCSeconds): (KJS::dateProtoFuncGetTimezoneOffset): (KJS::setNewValueFromTimeArgs): (KJS::setNewValueFromDateArgs): (KJS::dateProtoFuncSetYear): (KJS::dateProtoFuncGetYear): Use the cache when converting. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
0fe258b0