Skip to content
  • benjamin@webkit.org's avatar
    Cache the type string of JavaScript object · 25ecbabb
    benjamin@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=81446
    
    Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-03-20
    Reviewed by Geoffrey Garen.
    
    Instead of creating the JSString every time, we create
    lazily the strings in JSGlobalData.
    
    This avoid the construction of the StringImpl and of the JSString,
    which gives some performance improvements.
    
    * runtime/CommonIdentifiers.h:
    * runtime/JSValue.cpp:
    (JSC::JSValue::toStringSlowCase):
    * runtime/Operations.cpp:
    (JSC::jsTypeStringForValue):
    * runtime/SmallStrings.cpp:
    (JSC::SmallStrings::SmallStrings):
    (JSC::SmallStrings::finalizeSmallStrings):
    (JSC::SmallStrings::initialize):
    (JSC):
    * runtime/SmallStrings.h:
    (SmallStrings):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    25ecbabb