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.cpp

    r60762 r65104  
    6666}
    6767
    68 bool Identifier::equal(const UString::Rep* r, const char* s)
     68bool Identifier::equal(const StringImpl* r, const char* s)
    6969{
    7070    int length = r->length();
     
    7676}
    7777
    78 bool Identifier::equal(const UString::Rep* r, const UChar* s, unsigned length)
     78bool Identifier::equal(const StringImpl* r, const UChar* s, unsigned length)
    7979{
    8080    if (r->length() != length)
     
    9090    static unsigned hash(const char* c)
    9191    {
    92         return UString::Rep::computeHash(c);
    93     }
    94 
    95     static bool equal(UString::Rep* r, const char* s)
     92        return StringImpl::computeHash(c);
     93    }
     94
     95    static bool equal(StringImpl* r, const char* s)
    9696    {
    9797        return Identifier::equal(r, s);
    9898    }
    9999
    100     static void translate(UString::Rep*& location, const char* c, unsigned hash)
     100    static void translate(StringImpl*& location, const char* c, unsigned hash)
    101101    {
    102102        size_t length = strlen(c);
    103103        UChar* d;
    104         UString::Rep* r = UString::Rep::createUninitialized(length, d).releaseRef();
     104        StringImpl* r = StringImpl::createUninitialized(length, d).releaseRef();
    105105        for (size_t i = 0; i != length; i++)
    106106            d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend
     
    110110};
    111111
    112 PassRefPtr<UString::Rep> Identifier::add(JSGlobalData* globalData, const char* c)
     112PassRefPtr<StringImpl> Identifier::add(JSGlobalData* globalData, const char* c)
    113113{
    114114    if (!c)
    115         return UString::null().rep();
     115        return 0;
    116116    if (!c[0])
    117         return UString::Rep::empty();
     117        return StringImpl::empty();
    118118    if (!c[1])
    119119        return add(globalData, globalData->smallStrings.singleCharacterStringRep(static_cast<unsigned char>(c[0])));
     
    126126        return iter->second;
    127127
    128     pair<HashSet<UString::Rep*>::iterator, bool> addResult = identifierTable.add<const char*, IdentifierCStringTranslator>(c);
     128    pair<HashSet<StringImpl*>::iterator, bool> addResult = identifierTable.add<const char*, IdentifierCStringTranslator>(c);
    129129
    130130    // If the string is newly-translated, then we need to adopt it.
    131131    // The boolean in the pair tells us if that is so.
    132     RefPtr<UString::Rep> addedString = addResult.second ? adoptRef(*addResult.first) : *addResult.first;
     132    RefPtr<StringImpl> addedString = addResult.second ? adoptRef(*addResult.first) : *addResult.first;
    133133
    134134    literalIdentifierTable.add(c, addedString.get());
     
    137137}
    138138
    139 PassRefPtr<UString::Rep> Identifier::add(ExecState* exec, const char* c)
     139PassRefPtr<StringImpl> Identifier::add(ExecState* exec, const char* c)
    140140{
    141141    return add(&exec->globalData(), c);
     
    150150    static unsigned hash(const UCharBuffer& buf)
    151151    {
    152         return UString::Rep::computeHash(buf.s, buf.length);
    153     }
    154 
    155     static bool equal(UString::Rep* str, const UCharBuffer& buf)
     152        return StringImpl::computeHash(buf.s, buf.length);
     153    }
     154
     155    static bool equal(StringImpl* str, const UCharBuffer& buf)
    156156    {
    157157        return Identifier::equal(str, buf.s, buf.length);
    158158    }
    159159
    160     static void translate(UString::Rep*& location, const UCharBuffer& buf, unsigned hash)
     160    static void translate(StringImpl*& location, const UCharBuffer& buf, unsigned hash)
    161161    {
    162162        UChar* d;
    163         UString::Rep* r = UString::Rep::createUninitialized(buf.length, d).releaseRef();
     163        StringImpl* r = StringImpl::createUninitialized(buf.length, d).releaseRef();
    164164        for (unsigned i = 0; i != buf.length; i++)
    165165            d[i] = buf.s[i];
     
    169169};
    170170
    171 PassRefPtr<UString::Rep> Identifier::add(JSGlobalData* globalData, const UChar* s, int length)
     171PassRefPtr<StringImpl> Identifier::add(JSGlobalData* globalData, const UChar* s, int length)
    172172{
    173173    if (length == 1) {
     
    177177    }
    178178    if (!length)
    179         return UString::Rep::empty();
     179        return StringImpl::empty();
    180180    UCharBuffer buf = {s, length};
    181     pair<HashSet<UString::Rep*>::iterator, bool> addResult = globalData->identifierTable->add<UCharBuffer, IdentifierUCharBufferTranslator>(buf);
     181    pair<HashSet<StringImpl*>::iterator, bool> addResult = globalData->identifierTable->add<UCharBuffer, IdentifierUCharBufferTranslator>(buf);
    182182
    183183    // If the string is newly-translated, then we need to adopt it.
     
    186186}
    187187
    188 PassRefPtr<UString::Rep> Identifier::add(ExecState* exec, const UChar* s, int length)
     188PassRefPtr<StringImpl> Identifier::add(ExecState* exec, const UChar* s, int length)
    189189{
    190190    return add(&exec->globalData(), s, length);
    191191}
    192192
    193 PassRefPtr<UString::Rep> Identifier::addSlowCase(JSGlobalData* globalData, UString::Rep* r)
     193PassRefPtr<StringImpl> Identifier::addSlowCase(JSGlobalData* globalData, StringImpl* r)
    194194{
    195195    ASSERT(!r->isIdentifier());
     
    209209}
    210210
    211 PassRefPtr<UString::Rep> Identifier::addSlowCase(ExecState* exec, UString::Rep* r)
     211PassRefPtr<StringImpl> Identifier::addSlowCase(ExecState* exec, StringImpl* r)
    212212{
    213213    return addSlowCase(&exec->globalData(), r);
Note: See TracChangeset for help on using the changeset viewer.