Ignore:
Timestamp:
Oct 30, 2009, 3:23:31 PM (16 years ago)
Author:
[email protected]
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/DateInstance.h

    r50183 r50359  
    3939        static JS_EXPORTDATA const ClassInfo info;
    4040
    41         bool getGregorianDateTime(ExecState*, bool outputIsUTC, WTF::GregorianDateTime&) const;
     41        const WTF::GregorianDateTime* gregorianDateTime(ExecState*, bool outputIsUTC) const;
    4242
    4343        static PassRefPtr<Structure> createStructure(JSValue prototype)
Note: See TracChangeset for help on using the changeset viewer.