Skip to content
  • barraclough@apple.com's avatar
    https://bugs.webkit.org/show_bug.cgi?id=32831 · 1c68c3de
    barraclough@apple.com authored
    Replace UString::Rep implementation, following introduction of ropes to JSC.
    
    Reviewed by Darin Adler.
    
    JavaScriptCore: 
    
        * Remove redundant overcapacity mechanisms.
        * Reduce memory cost of Rep's.
        * Add an inline storage mechanism akin to that in WebCore's StringImpl.
    
    ~1% Sunspider progression.
    
    * JavaScriptCore.exp:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * runtime/JSString.cpp:
    (JSC::JSString::resolveRope):
    * runtime/SmallStrings.cpp:
    (JSC::SmallStringsStorage::SmallStringsStorage):
    * runtime/UString.cpp:
    (JSC::initializeUString):
    (JSC::createRep):
    (JSC::UString::createFromUTF8):
    (JSC::UString::createUninitialized):
    (JSC::UString::spliceSubstringsWithSeparators):
    (JSC::UString::replaceRange):
    (JSC::UString::ascii):
    (JSC::UString::operator=):
    (JSC::UString::toStrictUInt32):
    (JSC::equal):
    * runtime/UString.h:
    (JSC::UString::isEmpty):
    (JSC::UString::cost):
    (JSC::makeString):
    * runtime/UStringImpl.cpp: Added.
    (JSC::UStringImpl::baseSharedBuffer):
    (JSC::UStringImpl::sharedBuffer):
    (JSC::UStringImpl::destroy):
    (JSC::UStringImpl::computeHash):
    * runtime/UStringImpl.h: Added.
    (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
    (JSC::UntypedPtrAndBitfield::asPtr):
    (JSC::UntypedPtrAndBitfield::operator&=):
    (JSC::UntypedPtrAndBitfield::operator|=):
    (JSC::UntypedPtrAndBitfield::operator&):
    (JSC::UStringImpl::create):
    (JSC::UStringImpl::createCopying):
    (JSC::UStringImpl::createUninitialized):
    (JSC::UStringImpl::data):
    (JSC::UStringImpl::size):
    (JSC::UStringImpl::cost):
    (JSC::UStringImpl::hash):
    (JSC::UStringImpl::computedHash):
    (JSC::UStringImpl::setHash):
    (JSC::UStringImpl::identifierTable):
    (JSC::UStringImpl::setIdentifierTable):
    (JSC::UStringImpl::ref):
    (JSC::UStringImpl::deref):
    (JSC::UStringImpl::allocChars):
    (JSC::UStringImpl::copyChars):
    (JSC::UStringImpl::computeHash):
    (JSC::UStringImpl::null):
    (JSC::UStringImpl::empty):
    (JSC::UStringImpl::checkConsistency):
    (JSC::UStringImpl::):
    (JSC::UStringImpl::UStringImpl):
    (JSC::UStringImpl::operator new):
    (JSC::UStringImpl::bufferOwnerString):
    (JSC::UStringImpl::bufferOwnership):
    (JSC::UStringImpl::isStatic):
    
    JavaScriptGlue: 
    
    * ForwardingHeaders/wtf/PossiblyNull.h: Added.
        - add forwarding header.
    
    WebCore: 
    
    * ForwardingHeaders/runtime/UStringImpl.h: Added.
        - add forwarding header.
    
    * platform/text/StringImpl.cpp:
    (WebCore::StringImpl::ustring):
        - order of arguments to UString::Rep constructor for shared strings changed.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    1c68c3de