Ignore:
Timestamp:
Oct 22, 2007, 11:39:46 AM (18 years ago)
Author:
darin
Message:

Reviewed by Eric Seidel.

Makes SunSpider 6% faster.

  • kjs/JSImmediate.h: Added toInt32 and toUInt32, with separate versions for 32-bit and 64-bit.
  • kjs/value.h: (KJS::JSValue::getUInt32): Call JSImmediate::toUInt32.
  • kjs/internal.h: Added getInt32.
  • kjs/internal.cpp: (KJS::NumberImp::getInt32): Added. (KJS::NumberImp::getUInt32): Replaced with more-optimal implementation stolen from JSValue.
  • kjs/value.h: (KJS::jsNumber): Marked ALWAYS_INLINE, because this wasn't getting inlined. (KJS::JSValue::getInt32): Added. (KJS::JSValue::getUInt32): Changed to call the new JSImmediate::toUInt32 to avoid converting from float to double. (KJS::JSValue::toInt32): Made inline, separated out the slow case. (KJS::JSValue::toUInt32): Ditto.
  • kjs/value.cpp: (KJS::JSCell::getInt32): Added. (KJS::JSValue::toInt32SlowCase): Renamed from toInt32. Changed to use the new getInt32. Added a faster case for in-range numbers. (KJS::JSValue::toUInt32SlowCase): Ditto. (KJS::JSValue::toUInt16): Added a faster case for in-range numbers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r26074 r26892  
    243243__ZNK3KJS4List2atEi
    244244__ZNK3KJS4List8copyTailEv
     245__ZNK3KJS6JSCell8getInt32ERi
    245246__ZNK3KJS6JSCell9getNumberERd
    246247__ZNK3KJS6JSCell9getNumberEv
     
    248249__ZNK3KJS6JSCell9getStringEv
    249250__ZNK3KJS6JSCell9getUInt32ERj
     251__ZNK3KJS7JSValue15toInt32SlowCaseEPNS_9ExecStateERb
     252__ZNK3KJS7JSValue16toUInt32SlowCaseEPNS_9ExecStateERb
    250253__ZNK3KJS7JSValue7toFloatEPNS_9ExecStateE
    251 __ZNK3KJS7JSValue7toInt32EPNS_9ExecStateE
    252 __ZNK3KJS7JSValue7toInt32EPNS_9ExecStateERb
    253 __ZNK3KJS7JSValue8toUInt32EPNS_9ExecStateE
    254 __ZNK3KJS7JSValue8toUInt32EPNS_9ExecStateERb
    255254__ZNK3KJS7JSValue9toIntegerEPNS_9ExecStateE
    256255__ZNK3KJS7UString10UTF8StringEv
Note: See TracChangeset for help on using the changeset viewer.