https://bugs.webkit.org/show_bug.cgi?id=30942
Use pointers instead of copies to pass GregorianDateTime objects around.
Patch by Geoffrey Garen <[email protected]> on 2009-10-29
Reviewed by Darin Adler.
SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3%
speedup on date-format-tofte.
- runtime/DateInstance.cpp:
(JSC::DateInstance::gregorianDateTime):
- runtime/DateInstance.h:
- runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime,
since it no longer has an out parameter. Uses 0 to indicate invalid dates.