Ignore:
Timestamp:
Aug 10, 2010, 5:16:38 PM (15 years ago)
Author:
[email protected]
Message:

Bug 43817 - Remove UString::Rep
UString::Rep has for a long time been replaced by UStringImpl (Rep
remaining as a typedef). UStringImpl has since been removed too
(unified with StringImpl). Remove Rep, rename rep() to impl() and
m_rep to m_impl. Also add impl() method to Identifier, and rename
its UString member from _ustring to m_string.

Rubber stamped by Sam Weinig

JavaScriptCore:

  • API/JSCallbackObject.h:

(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):

  • API/JSCallbackObjectFunctions.h:

(JSC::::getOwnPropertySlot):
(JSC::::put):
(JSC::::deleteProperty):
(JSC::::getOwnPropertyNames):
(JSC::::staticValueGetter):
(JSC::::staticFunctionGetter):

  • API/JSClassRef.cpp:

(tryCreateStringFromUTF8):
(OpaqueJSClass::OpaqueJSClass):
(OpaqueJSClass::~OpaqueJSClass):
(OpaqueJSClassContextData::OpaqueJSClassContextData):

  • API/JSClassRef.h:
  • API/OpaqueJSString.cpp:

(OpaqueJSString::ustring):

  • bytecode/EvalCodeCache.h:

(JSC::EvalCodeCache::get):

  • bytecode/JumpTable.h:

(JSC::StringJumpTable::offsetForValue):
(JSC::StringJumpTable::ctiForValue):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::addVar):
(JSC::BytecodeGenerator::addGlobalVar):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::addParameter):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::willResolveToArguments):
(JSC::BytecodeGenerator::uncheckedRegisterForArguments):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::isLocal):
(JSC::BytecodeGenerator::isLocalConstant):
(JSC::BytecodeGenerator::addConstant):
(JSC::BytecodeGenerator::emitLoad):
(JSC::BytecodeGenerator::findScopedProperty):
(JSC::keyForCharacterSwitch):
(JSC::prepareJumpTableForStringSwitch):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::processClauseList):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • parser/JSParser.cpp:

(JSC::JSParser::parseStrictObjectLiteral):

  • pcre/pcre_exec.cpp:

(Histogram::add):

  • profiler/CallIdentifier.h:

(JSC::CallIdentifier::Hash::hash):

  • profiler/Profile.cpp:
  • profiler/ProfileNode.cpp:

(JSC::ProfileNode::debugPrintDataSampleStyle):

  • profiler/ProfileNode.h:
  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToString):

  • runtime/Identifier.cpp:

(JSC::Identifier::equal):
(JSC::IdentifierCStringTranslator::hash):
(JSC::IdentifierCStringTranslator::equal):
(JSC::IdentifierCStringTranslator::translate):
(JSC::Identifier::add):
(JSC::IdentifierUCharBufferTranslator::hash):
(JSC::IdentifierUCharBufferTranslator::equal):
(JSC::IdentifierUCharBufferTranslator::translate):
(JSC::Identifier::addSlowCase):

  • runtime/Identifier.h:

(JSC::Identifier::Identifier):
(JSC::Identifier::ustring):
(JSC::Identifier::impl):
(JSC::Identifier::data):
(JSC::Identifier::size):
(JSC::Identifier::ascii):
(JSC::Identifier::isNull):
(JSC::Identifier::isEmpty):
(JSC::Identifier::toUInt32):
(JSC::Identifier::toStrictUInt32):
(JSC::Identifier::toArrayIndex):
(JSC::Identifier::toDouble):
(JSC::Identifier::equal):
(JSC::Identifier::add):

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreadingOnce):

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::displayName):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::displayName):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::addStaticGlobals):

  • runtime/JSStaticScopeObject.h:

(JSC::JSStaticScopeObject::JSStaticScopeObject):

  • runtime/JSString.h:

(JSC::):
(JSC::RopeBuilder::appendStringInConstruct):
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::jsSingleCharacterSubstring):
(JSC::jsSubstring):

  • runtime/JSVariableObject.cpp:

(JSC::JSVariableObject::deleteProperty):
(JSC::JSVariableObject::symbolTableGet):

  • runtime/JSVariableObject.h:

(JSC::JSVariableObject::symbolTableGet):
(JSC::JSVariableObject::symbolTablePut):
(JSC::JSVariableObject::symbolTablePutWithAttributes):

  • runtime/Lookup.cpp:

(JSC::HashTable::createTable):
(JSC::HashTable::deleteTable):

  • runtime/Lookup.h:

(JSC::HashEntry::initialize):
(JSC::HashEntry::setKey):
(JSC::HashEntry::key):
(JSC::HashTable::entry):

  • runtime/PropertyMapHashTable.h:

(JSC::PropertyMapEntry::PropertyMapEntry):

  • runtime/PropertyNameArray.cpp:

(JSC::PropertyNameArray::add):

  • runtime/PropertyNameArray.h:

(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique):

  • runtime/RegExp.cpp:

(JSC::RegExp::match):

  • runtime/RegExpCache.cpp:

(JSC::RegExpCache::create):

  • runtime/RegExpKey.h:

(JSC::RegExpKey::RegExpKey):

  • runtime/SmallStrings.cpp:

(JSC::SmallStringsStorage::rep):
(JSC::SmallStrings::singleCharacterStringRep):

  • runtime/SmallStrings.h:
  • runtime/StringPrototype.cpp:

(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):

  • runtime/Structure.cpp:

(JSC::Structure::~Structure):
(JSC::Structure::despecifyDictionaryFunction):
(JSC::Structure::addPropertyTransitionToExistingStructure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::copyPropertyTable):
(JSC::Structure::get):
(JSC::Structure::despecifyFunction):
(JSC::Structure::put):
(JSC::Structure::hasTransition):
(JSC::Structure::remove):
(JSC::Structure::checkConsistency):

  • runtime/Structure.h:

(JSC::Structure::get):
(JSC::Structure::hasTransition):

  • runtime/StructureTransitionTable.h:
  • runtime/SymbolTable.h:
  • runtime/UString.cpp:

(JSC::UString::UString):
(JSC::UString::toStrictUInt32):
(JSC::UString::substr):

  • runtime/UString.h:

(JSC::UString::UString):
(JSC::UString::adopt):
(JSC::UString::data):
(JSC::UString::size):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
(JSC::UString::cost):
(JSC::operator==):
(JSC::codePointCompare):
(JSC::IdentifierRepHash::hash):
(WTF::):

WebCore:

  • bindings/js/JSDOMBinding.cpp:

(WebCore::findAtomicString):

  • bindings/js/JSDOMBinding.h:

(WebCore::ustringToString):
(WebCore::identifierToString):
(WebCore::ustringToAtomicString):
(WebCore::identifierToAtomicString):

  • bindings/js/SerializedScriptValue.h:

(WebCore::SerializedScriptValueData::SerializedScriptValueData):

  • bridge/IdentifierRep.cpp:

(WebCore::IdentifierRep::get):

  • bridge/c/c_class.cpp:

(JSC::Bindings::CClass::methodsNamed):
(JSC::Bindings::CClass::fieldNamed):

  • bridge/jni/jsc/JavaClassJSC.cpp:

(JavaClass::JavaClass):
(JavaClass::methodsNamed):
(JavaClass::fieldNamed):

  • bridge/jni/jsc/JavaStringJSC.h:

(JSC::Bindings::JavaStringImpl::~JavaStringImpl):
(JSC::Bindings::JavaStringImpl::init):
(JSC::Bindings::JavaStringImpl::UTF8String):
(JSC::Bindings::JavaStringImpl::uchars):
(JSC::Bindings::JavaStringImpl::length):
(JSC::Bindings::JavaStringImpl::uString):

  • bridge/jsc/BridgeJSC.h:

WebKit/mac:

  • Plugins/Hosted/ProxyInstance.mm:

(WebKit::ProxyInstance::methodsNamed):
(WebKit::ProxyInstance::fieldNamed):

File:
1 edited

Legend:

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

    r60762 r65104  
    3535        Identifier() { }
    3636
    37         Identifier(ExecState* exec, const char* s) : _ustring(add(exec, s)) { } // Only to be used with string literals.
    38         Identifier(ExecState* exec, const UChar* s, int length) : _ustring(add(exec, s, length)) { }
    39         Identifier(ExecState* exec, UString::Rep* rep) : _ustring(add(exec, rep)) { }
    40         Identifier(ExecState* exec, const UString& s) : _ustring(add(exec, s.rep())) { }
     37        Identifier(ExecState* exec, const char* s) : m_string(add(exec, s)) { } // Only to be used with string literals.
     38        Identifier(ExecState* exec, const UChar* s, int length) : m_string(add(exec, s, length)) { }
     39        Identifier(ExecState* exec, StringImpl* rep) : m_string(add(exec, rep)) { }
     40        Identifier(ExecState* exec, const UString& s) : m_string(add(exec, s.impl())) { }
    4141
    42         Identifier(JSGlobalData* globalData, const char* s) : _ustring(add(globalData, s)) { } // Only to be used with string literals.
    43         Identifier(JSGlobalData* globalData, const UChar* s, int length) : _ustring(add(globalData, s, length)) { }
    44         Identifier(JSGlobalData* globalData, UString::Rep* rep) : _ustring(add(globalData, rep)) { }
    45         Identifier(JSGlobalData* globalData, const UString& s) : _ustring(add(globalData, s.rep())) { }
     42        Identifier(JSGlobalData* globalData, const char* s) : m_string(add(globalData, s)) { } // Only to be used with string literals.
     43        Identifier(JSGlobalData* globalData, const UChar* s, int length) : m_string(add(globalData, s, length)) { }
     44        Identifier(JSGlobalData* globalData, StringImpl* rep) : m_string(add(globalData, rep)) { }
     45        Identifier(JSGlobalData* globalData, const UString& s) : m_string(add(globalData, s.impl())) { }
    4646
    4747        // Special constructor for cases where we overwrite an object in place.
    48         Identifier(PlacementNewAdoptType) : _ustring(PlacementNewAdopt) { }
     48        Identifier(PlacementNewAdoptType) : m_string(PlacementNewAdopt) { }
    4949       
    50         const UString& ustring() const { return _ustring; }
     50        const UString& ustring() const { return m_string; }
     51        StringImpl* impl() const { return m_string.impl(); }
    5152       
    52         const UChar* data() const { return _ustring.data(); }
    53         int size() const { return _ustring.size(); }
     53        const UChar* data() const { return m_string.data(); }
     54        int size() const { return m_string.size(); }
    5455       
    55         const char* ascii() const { return _ustring.ascii(); }
     56        const char* ascii() const { return m_string.ascii(); }
    5657       
    5758        static Identifier from(ExecState* exec, unsigned y);
     
    6263        static Identifier from(JSGlobalData*, double y);
    6364       
    64         bool isNull() const { return _ustring.isNull(); }
    65         bool isEmpty() const { return _ustring.isEmpty(); }
     65        bool isNull() const { return m_string.isNull(); }
     66        bool isEmpty() const { return m_string.isEmpty(); }
    6667       
    67         uint32_t toUInt32(bool* ok) const { return _ustring.toUInt32(ok); }
    68         uint32_t toUInt32(bool* ok, bool tolerateEmptyString) const { return _ustring.toUInt32(ok, tolerateEmptyString); };
    69         uint32_t toStrictUInt32(bool* ok) const { return _ustring.toStrictUInt32(ok); }
    70         unsigned toArrayIndex(bool* ok) const { return _ustring.toArrayIndex(ok); }
    71         double toDouble() const { return _ustring.toDouble(); }
     68        uint32_t toUInt32(bool* ok) const { return m_string.toUInt32(ok); }
     69        uint32_t toUInt32(bool* ok, bool tolerateEmptyString) const { return m_string.toUInt32(ok, tolerateEmptyString); };
     70        uint32_t toStrictUInt32(bool* ok) const { return m_string.toStrictUInt32(ok); }
     71        unsigned toArrayIndex(bool* ok) const { return m_string.toArrayIndex(ok); }
     72        double toDouble() const { return m_string.toDouble(); }
    7273       
    7374        friend bool operator==(const Identifier&, const Identifier&);
     
    7778        friend bool operator!=(const Identifier&, const char*);
    7879   
    79         static bool equal(const UString::Rep*, const char*);
    80         static bool equal(const UString::Rep*, const UChar*, unsigned length);
    81         static bool equal(const UString::Rep* a, const UString::Rep* b) { return ::equal(a, b); }
     80        static bool equal(const StringImpl*, const char*);
     81        static bool equal(const StringImpl*, const UChar*, unsigned length);
     82        static bool equal(const StringImpl* a, const StringImpl* b) { return ::equal(a, b); }
    8283
    83         static PassRefPtr<UString::Rep> add(ExecState*, const char*); // Only to be used with string literals.
    84         static PassRefPtr<UString::Rep> add(JSGlobalData*, const char*); // Only to be used with string literals.
     84        static PassRefPtr<StringImpl> add(ExecState*, const char*); // Only to be used with string literals.
     85        static PassRefPtr<StringImpl> add(JSGlobalData*, const char*); // Only to be used with string literals.
    8586
    8687    private:
    87         UString _ustring;
     88        UString m_string;
    8889       
    89         static bool equal(const Identifier& a, const Identifier& b) { return a._ustring.rep() == b._ustring.rep(); }
    90         static bool equal(const Identifier& a, const char* b) { return equal(a._ustring.rep(), b); }
     90        static bool equal(const Identifier& a, const Identifier& b) { return a.m_string.impl() == b.m_string.impl(); }
     91        static bool equal(const Identifier& a, const char* b) { return equal(a.m_string.impl(), b); }
    9192
    92         static PassRefPtr<UString::Rep> add(ExecState*, const UChar*, int length);
    93         static PassRefPtr<UString::Rep> add(JSGlobalData*, const UChar*, int length);
     93        static PassRefPtr<StringImpl> add(ExecState*, const UChar*, int length);
     94        static PassRefPtr<StringImpl> add(JSGlobalData*, const UChar*, int length);
    9495
    95         static PassRefPtr<UString::Rep> add(ExecState* exec, UString::Rep* r)
     96        static PassRefPtr<StringImpl> add(ExecState* exec, StringImpl* r)
    9697        {
    9798#ifndef NDEBUG
     
    102103            return addSlowCase(exec, r);
    103104        }
    104         static PassRefPtr<UString::Rep> add(JSGlobalData* globalData, UString::Rep* r)
     105        static PassRefPtr<StringImpl> add(JSGlobalData* globalData, StringImpl* r)
    105106        {
    106107#ifndef NDEBUG
     
    112113        }
    113114
    114         static PassRefPtr<UString::Rep> addSlowCase(ExecState*, UString::Rep* r);
    115         static PassRefPtr<UString::Rep> addSlowCase(JSGlobalData*, UString::Rep* r);
     115        static PassRefPtr<StringImpl> addSlowCase(ExecState*, StringImpl* r);
     116        static PassRefPtr<StringImpl> addSlowCase(JSGlobalData*, StringImpl* r);
    116117
    117118        static void checkCurrentIdentifierTable(ExecState*);
Note: See TracChangeset for help on using the changeset viewer.