Ignore:
Timestamp:
Jan 11, 2009, 7:19:23 PM (16 years ago)
Author:
Darin Adler
Message:

2009-01-11 David Levin <[email protected]>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=23175

Separate out BaseString information from UString::Rep and make all baseString access go through
a member function, so that it may be used for something else (in the future) in the BaseString
case.

  • runtime/SmallStrings.cpp: (JSC::SmallStringsStorage::rep): (JSC::SmallStringsStorage::SmallStringsStorage): (JSC::SmallStrings::SmallStrings): (JSC::SmallStrings::mark): Adjust to account for the changes in UString and put the UString in place in SmallStringsStorage to aid in locality of reference among the UChar[] and UString::Rep's.
  • runtime/SmallStrings.h:
  • runtime/UString.cpp: (JSC::initializeStaticBaseString): (JSC::initializeUString): (JSC::UString::Rep::create): (JSC::UString::Rep::destroy): (JSC::UString::Rep::checkConsistency): (JSC::expandCapacity): (JSC::UString::expandPreCapacity): (JSC::concatenate): (JSC::UString::append): (JSC::UString::operator=):
  • runtime/UString.h: (JSC::UString::Rep::baseIsSelf): (JSC::UString::Rep::setBaseString): (JSC::UString::Rep::baseString): (JSC::UString::Rep::): (JSC::UString::Rep::null): (JSC::UString::Rep::empty): (JSC::UString::Rep::data): (JSC::UString::cost): Separate out the items out used by base strings from those used in Rep's that only point to base strings. (This potentially saves 24 bytes per Rep.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/SmallStrings.h

    r38137 r39815  
    5656
    5757        UString::Rep* singleCharacterStringRep(unsigned char character);
    58        
     58
    5959        void mark();
    60        
     60
    6161    private:
    6262        void createEmptyString(JSGlobalData*);
     
    6767        OwnPtr<SmallStringsStorage> m_storage;
    6868    };
    69    
    70 }
    7169
    72 #endif
     70} // namespace JSC
     71
     72#endif // SmallStrings_h
Note: See TracChangeset for help on using the changeset viewer.