Ignore:
Timestamp:
Mar 5, 2010, 3:29:13 PM (15 years ago)
Author:
[email protected]
Message:

2010-03-05 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

JSC should cache int to Identifier conversion as it does for ordinary strings
https://bugs.webkit.org/show_bug.cgi?id=35814

Make the NumericStrings cache cache unsigned ints in addition to signed.
We keep them separate from the int cache as it both simplifies code, and
also because the unsigned path is exclusive to property access and therefore
seems to have different usage patterns.

The primary trigger for the unsigned to Identifier propertyName conversion
is the construction of array-like objects out of normal objects. Given these
tend to be relative small numbers, and the array-like behaviour lends itself
to sequential values this patch also adds a non-colliding cache for all small
numbers.

  • JavaScriptCore.exp:
  • runtime/Identifier.cpp: (JSC::Identifier::from):
  • runtime/Identifier.h:
  • runtime/NumericStrings.h: (JSC::NumericStrings::add): (JSC::NumericStrings::lookup): (JSC::NumericStrings::lookupSmallString):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r55401 r55599  
    9696__ZN3JSC10Identifier24checkSameIdentifierTableEPNS_9ExecStateEPNS_11UStringImplE
    9797__ZN3JSC10Identifier3addEPNS_9ExecStateEPKc
     98__ZN3JSC10Identifier4fromEPNS_9ExecStateEi
     99__ZN3JSC10Identifier4fromEPNS_9ExecStateEj
    98100__ZN3JSC10Identifier5equalEPKNS_11UStringImplEPKc
    99101__ZN3JSC10JSFunctionC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE
Note: See TracChangeset for help on using the changeset viewer.