Reviewed by Dave.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Apr 2004 21:26:40 +0000 (21:26 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Apr 2004 21:26:40 +0000 (21:26 +0000)
commit4a2f3995c031412804d2fd9cc907e020ce2a966c
tree648ffc7920cd4251d7b0045084c3348658661190
parentfca6df12e99c262e830cd6424cce612f8d8e45bb
    Reviewed by Dave.

Optimize prepend using the shared substring optimization. Also,
limit the applicability of shared append and shared prepend. If
you overdo it, it does more harm than good, because you create a
bunch of strings that are disqualified from future shared
append/prepend, for not much immediate savings in allocate/copy
expense.

        * kjs/ustring.cpp:
        (KJS::):
        (KJS::UString::Rep::create):
        (KJS::UString::expandedSize):
        (KJS::UString::usedPreCapacity):
        (KJS::UString::expandCapacity):
        (KJS::UString::expandPreCapacity):
        (KJS::UString::UString):
        (KJS::UString::append):
        (KJS::UString::operator=):
        * kjs/ustring.h:
        (KJS::UString::Rep::data):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/ustring.cpp
JavaScriptCore/kjs/ustring.h