• ggaren@apple.com's avatar
    Save space on keys in the CodeCache · de5cc65c
    ggaren@apple.com authored
    Reviewed by Oliver Hunt.
    Share the SourceProvider's string instead of making our own copy. This
    chops off 16MB - 32MB from the CodeCache's memory footprint when full.
    (It's 16MB when the strings are LChar, and 32MB when they're UChar.)
    * runtime/CodeCache.cpp:
    * runtime/CodeCache.h: Removed a defunct enum value.
    (JSC::SourceCodeKey::operator==): Store a SourceCode instead of a String
    so we can share our string with our SourceProvider. Cache our hash so
    we don't have to re-decode our string just to re-hash the table.
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeCache.cpp 6.26 KB