Ignore:
Timestamp:
Sep 7, 2012, 10:46:29 PM (13 years ago)
Author:
[email protected]
Message:

Rename the ustring() accessor to string()
https://bugs.webkit.org/show_bug.cgi?id=95919

Patch by Benjamin Poulain <[email protected]> on 2012-09-07
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Rename ustring() to string() to make the accessor name more logical after
r127191.

  • API/JSBase.cpp:

(JSEvaluateScript):
(JSCheckScriptSyntax):

  • API/JSObjectRef.cpp:

(JSObjectMakeFunctionWithCallback):
(JSObjectMakeFunction):
(JSObjectCopyPropertyNames):

  • API/JSProfilerPrivate.cpp:

(JSStartProfiling):
(JSEndProfiling):

  • API/JSValueRef.cpp:

(JSValueMakeString):
(JSValueMakeFromJSONString):

  • API/OpaqueJSString.cpp:

(OpaqueJSString::string):

  • API/OpaqueJSString.h:

(OpaqueJSString):

  • bytecode/CodeBlock.cpp:

(JSC::idName):
(JSC::CodeBlock::dump):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitLoad):
(JSC::BytecodeGenerator::addStringConstant):

  • bytecompiler/NodesCodegen.cpp:

(JSC::RegExpNode::emitBytecode):
(JSC::processClauseList):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • jsc.cpp:

(GlobalObject::addFunction):
(GlobalObject::addConstructableFunction):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createRegExp):

  • parser/Parser.cpp:

(JSC::::parsePrimaryExpression):

  • parser/Parser.h:

(JSC::Scope::declareVariable):
(JSC::Scope::declareParameter):
(JSC::Scope::useVariable):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createRegExp):

  • runtime/ExceptionHelpers.cpp:

(JSC::createUndefinedVariableError):

  • runtime/Executable.cpp:

(JSC::FunctionExecutable::paramString):

  • runtime/Executable.h:

(JSC::FunctionExecutable::finishCreation):

  • runtime/FunctionPrototype.cpp:

(JSC::FunctionPrototype::addFunctionProperties):

  • runtime/Identifier.h:

(JSC::Identifier::string):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::calculatedDisplayName):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::reset):

  • runtime/JSONObject.cpp:

(JSC::PropertyNameForFunctionCall::value):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::walk):

  • runtime/JSPropertyNameIterator.h:

(JSC::JSPropertyNameIterator::finishCreation):

  • runtime/JSScope.cpp:

(JSC::JSScope::resolveBase):

  • runtime/JSString.h:

(JSC::inlineJSValueNotStringtoString):

  • runtime/LiteralParser.cpp:

(JSC::::parse):

  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::finishCreation):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):

  • runtime/RegExpConstructor.cpp:

(JSC::RegExpConstructor::finishCreation):

Source/WebCore:

  • bindings/js/Dictionary.cpp:

(WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
(WebCore::Dictionary::getOwnPropertyNames):

  • bindings/js/SerializedScriptValue.cpp:

Simplify a few String constructions which were still using type conversion
through StringImpl.

(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::CachedString::string):
(WebCore::CloneDeserializer::readFile):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::CloneDeserializer::deserialize):

  • bridge/NP_jsobject.cpp:

(_NPN_Enumerate):

Source/WebKit/efl:

  • WebCoreSupport/DumpRenderTreeSupportEfl.cpp:

(DumpRenderTreeSupportEfl::sendWebIntentResponse):
(DumpRenderTreeSupportEfl::deliverWebIntent):
Aslo update the code from the UString->String conversion through StringImpl.

Source/WebKit/mac:

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::enumerate):

Source/WebKit2:

  • WebProcess/Plugins/Netscape/NPJSObject.cpp:

(WebKit::NPJSObject::enumerate):

Tools:

Update EFL's DRT.

Fix some string conversion that have been made useless
with recent changes.

  • DumpRenderTree/efl/EventSender.cpp:

(keyPadNameFromJSValue):
(keyNameFromJSValue):

  • DumpRenderTree/efl/TestRunnerEfl.cpp:

(TestRunner::queueLoad):
(TestRunner::addOriginAccessWhitelistEntry):
(TestRunner::removeOriginAccessWhitelistEntry):
(TestRunner::setUserStyleSheetLocation):
(TestRunner::setValueForUser):
(TestRunner::elementDoesAutoCompleteForElementWithId):
(TestRunner::execCommand):
(TestRunner::findString):
(TestRunner::isCommandEnabled):
(TestRunner::clearApplicationCacheForOrigin):
(TestRunner::setDomainRelaxationForbiddenForURLScheme):
(TestRunner::pauseAnimationAtTimeOnElementWithId):
(TestRunner::pauseTransitionAtTimeOnElementWithId):
(toInt):
(TestRunner::overridePreference):
(TestRunner::addUserScript):
(TestRunner::addUserStyleSheet):
(TestRunner::evaluateInWebInspector):
(TestRunner::evaluateScriptInIsolatedWorld):
(TestRunner::setTextDirection):

  • DumpRenderTree/efl/WorkQueueItemEfl.cpp:

(LoadItem::invoke):
(LoadHTMLStringItem::invoke):
(ScriptItem::invoke):

Location:
trunk/Source/JavaScriptCore/runtime
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp

    r127505 r127958  
    107107JSObject* createUndefinedVariableError(ExecState* exec, const Identifier& ident)
    108108{
    109     String message(makeString("Can't find variable: ", ident.ustring()));
     109    String message(makeString("Can't find variable: ", ident.string()));
    110110    return createReferenceError(exec, message);
    111111}
  • trunk/Source/JavaScriptCore/runtime/Executable.cpp

    r127810 r127958  
    673673
    674674    FunctionExecutable* functionExecutable = FunctionExecutable::create(exec->globalData(), body);
    675     functionExecutable->m_nameValue.set(exec->globalData(), functionExecutable, jsString(&exec->globalData(), name.ustring()));
     675    functionExecutable->m_nameValue.set(exec->globalData(), functionExecutable, jsString(&exec->globalData(), name.string()));
    676676    return functionExecutable;
    677677}
     
    684684        if (!builder.isEmpty())
    685685            builder.appendLiteral(", ");
    686         builder.append(parameters[pos].ustring());
     686        builder.append(parameters[pos].string());
    687687    }
    688688    return builder.toString();
  • trunk/Source/JavaScriptCore/runtime/Executable.h

    r127810 r127958  
    713713        {
    714714            Base::finishCreation(globalData);
    715             m_nameValue.set(globalData, this, jsString(&globalData, name().ustring()));
     715            m_nameValue.set(globalData, this, jsString(&globalData, name().string()));
    716716        }
    717717
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp

    r127191 r127958  
    5656void FunctionPrototype::addFunctionProperties(ExecState* exec, JSGlobalObject* globalObject, JSFunction** callFunction, JSFunction** applyFunction)
    5757{
    58     JSFunction* toStringFunction = JSFunction::create(exec, globalObject, 0, exec->propertyNames().toString.ustring(), functionProtoFuncToString);
     58    JSFunction* toStringFunction = JSFunction::create(exec, globalObject, 0, exec->propertyNames().toString.string(), functionProtoFuncToString);
    5959    putDirectWithoutTransition(exec->globalData(), exec->propertyNames().toString, toStringFunction, DontEnum);
    6060
    61     *applyFunction = JSFunction::create(exec, globalObject, 2, exec->propertyNames().apply.ustring(), functionProtoFuncApply);
     61    *applyFunction = JSFunction::create(exec, globalObject, 2, exec->propertyNames().apply.string(), functionProtoFuncApply);
    6262    putDirectWithoutTransition(exec->globalData(), exec->propertyNames().apply, *applyFunction, DontEnum);
    6363
    64     *callFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().call.ustring(), functionProtoFuncCall);
     64    *callFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().call.string(), functionProtoFuncCall);
    6565    putDirectWithoutTransition(exec->globalData(), exec->propertyNames().call, *callFunction, DontEnum);
    6666
    67     JSFunction* bindFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().bind.ustring(), functionProtoFuncBind);
     67    JSFunction* bindFunction = JSFunction::create(exec, globalObject, 1, exec->propertyNames().bind.string(), functionProtoFuncBind);
    6868    putDirectWithoutTransition(exec->globalData(), exec->propertyNames().bind, bindFunction, DontEnum);
    6969}
  • trunk/Source/JavaScriptCore/runtime/Identifier.h

    r127191 r127958  
    5353        Identifier(JSGlobalData* globalData, const String& s) : m_string(add(globalData, s.impl())) { }
    5454
    55         // FIXME: fix this name.
    56         const String& ustring() const { return m_string; }
     55        const String& string() const { return m_string; }
    5756        StringImpl* impl() const { return m_string.impl(); }
    5857       
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r127505 r127958  
    151151        return actualName;
    152152   
    153     return jsExecutable()->inferredName().ustring();
     153    return jsExecutable()->inferredName().string();
    154154}
    155155
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r127505 r127958  
    305305    putDirectWithoutTransition(exec->globalData(), Identifier(exec, "URIError"), m_URIErrorConstructor.get(), DontEnum);
    306306
    307     m_evalFunction.set(exec->globalData(), this, JSFunction::create(exec, this, 1, exec->propertyNames().eval.ustring(), globalFuncEval));
     307    m_evalFunction.set(exec->globalData(), this, JSFunction::create(exec, this, 1, exec->propertyNames().eval.string(), globalFuncEval));
    308308    putDirectWithoutTransition(exec->globalData(), exec->propertyNames().eval, m_evalFunction.get(), DontEnum);
    309309
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r127505 r127958  
    194194    if (!m_value) {
    195195        if (m_identifier)
    196             m_value = jsString(exec, m_identifier->ustring());
     196            m_value = jsString(exec, m_identifier->string());
    197197        else
    198198            m_value = jsNumber(m_number);
     
    558558
    559559        // Append the property name.
    560         appendQuotedString(builder, propertyName.ustring());
     560        appendQuotedString(builder, propertyName.string());
    561561        builder.append(':');
    562562        if (stringifier.willIndent())
     
    770770                Identifier prop = propertyStack.last()[indexStack.last()];
    771771                PutPropertySlot slot;
    772                 JSValue filteredValue = callReviver(object, jsString(m_exec, prop.ustring()), outValue);
     772                JSValue filteredValue = callReviver(object, jsString(m_exec, prop.string()), outValue);
    773773                if (filteredValue.isUndefined())
    774774                    object->methodTable()->deleteProperty(object, m_exec, prop);
  • trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h

    r121925 r127958  
    8888            PropertyNameArrayData::PropertyNameVector& propertyNameVector = propertyNameArrayData->propertyNameVector();
    8989            for (size_t i = 0; i < m_jsStringsSize; ++i)
    90                 m_jsStrings[i].set(exec->globalData(), this, jsOwnedString(exec, propertyNameVector[i].ustring()));
     90                m_jsStrings[i].set(exec->globalData(), this, jsOwnedString(exec, propertyNameVector[i].string()));
    9191            m_offsetBase = object->structure()->firstValidOffset();
    9292        }
  • trunk/Source/JavaScriptCore/runtime/JSScope.cpp

    r127363 r127958  
    211211        return callFrame->lexicalGlobalObject();
    212212
    213     return throwError(callFrame, createErrorForInvalidGlobalAssignment(callFrame, identifier.ustring()));
     213    return throwError(callFrame, createErrorForInvalidGlobalAssignment(callFrame, identifier.string()));
    214214}
    215215
  • trunk/Source/JavaScriptCore/runtime/JSString.h

    r127505 r127958  
    532532            return globalData.numericStrings.add(value.asDouble());
    533533        if (value.isTrue())
    534             return globalData.propertyNames->trueKeyword.ustring();
     534            return globalData.propertyNames->trueKeyword.string();
    535535        if (value.isFalse())
    536             return globalData.propertyNames->falseKeyword.ustring();
     536            return globalData.propertyNames->falseKeyword.string();
    537537        if (value.isNull())
    538             return globalData.propertyNames->nullKeyword.ustring();
     538            return globalData.propertyNames->nullKeyword.string();
    539539        if (value.isUndefined())
    540             return globalData.propertyNames->undefinedKeyword.ustring();
     540            return globalData.propertyNames->undefinedKeyword.string();
    541541        return value.toString(exec)->value(exec);
    542542    }
  • trunk/Source/JavaScriptCore/runtime/LiteralParser.cpp

    r127505 r127958  
    665665                        m_lexer.next();
    666666                        if (stringToken.stringIs8Bit)
    667                             lastValue = jsString(m_exec, makeIdentifier(stringToken.stringToken8, stringToken.stringLength).ustring());
     667                            lastValue = jsString(m_exec, makeIdentifier(stringToken.stringToken8, stringToken.stringLength).string());
    668668                        else
    669                             lastValue = jsString(m_exec, makeIdentifier(stringToken.stringToken16, stringToken.stringLength).ustring());
     669                            lastValue = jsString(m_exec, makeIdentifier(stringToken.stringToken16, stringToken.stringLength).string());
    670670                        break;
    671671                    }
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp

    r127505 r127958  
    8585void ObjectConstructor::finishCreation(ExecState* exec, ObjectPrototype* objectPrototype)
    8686{
    87     Base::finishCreation(exec->globalData(), Identifier(exec, "Object").ustring());
     87    Base::finishCreation(exec->globalData(), Identifier(exec, "Object").string());
    8888    // ECMA 15.2.3.1
    8989    putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
     
    186186    size_t numProperties = properties.size();
    187187    for (size_t i = 0; i < numProperties; i++)
    188         names->push(exec, jsOwnedString(exec, properties[i].ustring()));
     188        names->push(exec, jsOwnedString(exec, properties[i].string()));
    189189    return JSValue::encode(names);
    190190}
     
    200200    size_t numProperties = properties.size();
    201201    for (size_t i = 0; i < numProperties; i++)
    202         keys->push(exec, jsOwnedString(exec, properties[i].ustring()));
     202        keys->push(exec, jsOwnedString(exec, properties[i].string()));
    203203    return JSValue::encode(keys);
    204204}
  • trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp

    r127505 r127958  
    9393void RegExpConstructor::finishCreation(ExecState* exec, RegExpPrototype* regExpPrototype)
    9494{
    95     Base::finishCreation(exec->globalData(), Identifier(exec, "RegExp").ustring());
     95    Base::finishCreation(exec->globalData(), Identifier(exec, "RegExp").string());
    9696    ASSERT(inherits(&s_info));
    9797
Note: See TracChangeset for help on using the changeset viewer.