Ignore:
Timestamp:
Nov 9, 2009, 7:39:19 PM (16 years ago)
Author:
[email protected]
Message:

Some manual inlining and constant propogation in Date code.

Reviewed by Sam Weinig.

SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark
says some previously evident stalls are now gone.

  • runtime/DateConstructor.cpp:

(JSC::callDate):

  • runtime/DateConversion.cpp:

(JSC::formatTime):
(JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants.

  • runtime/DateConversion.h:
  • runtime/DateInstance.cpp:

(JSC::DateInstance::calculateGregorianDateTime):
(JSC::DateInstance::calculateGregorianDateTimeUTC):

  • runtime/DateInstance.h:

(JSC::DateInstance::gregorianDateTime):
(JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
a UTC and non-UTC variant, and split each variant into a fast inline
case and a slow out-of-line case.

  • 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): Updated for the gregorianDateTime change above.

File:
1 edited

Legend:

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

    r50608 r50708  
    5252UString formatDate(const GregorianDateTime&);
    5353UString formatDateUTCVariant(const GregorianDateTime&);
    54 UString formatTime(const GregorianDateTime&, bool inputIsUTC);
     54UString formatTime(const GregorianDateTime&);
     55UString formatTimeUTC(const GregorianDateTime&);
    5556
    5657} // namespace JSC
Note: See TracChangeset for help on using the changeset viewer.