Changeset 65177 in webkit for trunk/JavaScriptCore/API


Ignore:
Timestamp:
Aug 11, 2010, 12:52:41 PM (15 years ago)
Author:
[email protected]
Message:

Rubber stamps by Darin Adler & Sam Weinig.

Bug 43867 - Some UString cleanup

Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String.
Move string concatenation methods to a new header to simplify down UString.h. Remove is8Bit().

JavaScriptCore:

  • API/JSClassRef.cpp:

(OpaqueJSClass::~OpaqueJSClass):
(OpaqueJSClass::className):

  • API/OpaqueJSString.cpp:

(OpaqueJSString::create):

(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpName):

  • bytecode/EvalCodeCache.h:

(JSC::EvalCodeCache::get):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ResolveNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::processClauseList):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createRegex):

  • parser/ParserArena.h:

(JSC::IdentifierArena::makeNumericIdentifier):

  • parser/SourceProvider.h:

(JSC::UStringSourceProvider::data):
(JSC::UStringSourceProvider::length):

  • profiler/Profiler.cpp:
  • runtime/Arguments.cpp:

(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyNames):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToString):

  • runtime/DatePrototype.cpp:

(JSC::formatLocaleDate):

  • runtime/ExceptionHelpers.cpp:
  • runtime/FunctionConstructor.cpp:
  • runtime/FunctionPrototype.cpp:

(JSC::insertSemicolonIfNeeded):

  • runtime/Identifier.h:

(JSC::Identifier::characters):
(JSC::Identifier::length):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::decode):
(JSC::parseInt):
(JSC::parseFloat):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):

  • runtime/JSNumberCell.cpp:

(JSC::JSNumberCell::toString):

  • runtime/JSONObject.cpp:

(JSC::gap):
(JSC::Stringifier::appendQuotedString):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::indent):
(JSC::Stringifier::unindent):
(JSC::Walker::walk):

  • runtime/JSString.cpp:

(JSC::JSString::replaceCharacter):
(JSC::JSString::getIndexSlowCase):

  • runtime/JSString.h:

(JSC::RopeBuilder::JSString):
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::RopeBuilder::fiberCount):
(JSC::jsSingleCharacterSubstring):
(JSC::jsNontrivialString):
(JSC::JSString::getIndex):
(JSC::jsString):
(JSC::jsStringWithFinalizer):
(JSC::jsSubstring):
(JSC::jsOwnedString):

  • runtime/JSStringBuilder.h:

(JSC::JSStringBuilder::append):

  • runtime/LiteralParser.h:

(JSC::LiteralParser::Lexer::Lexer):

  • runtime/NumberPrototype.cpp:

(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):

  • runtime/NumericStrings.h:

(JSC::NumericStrings::add):
(JSC::NumericStrings::lookupSmallString):

  • runtime/Operations.h:

(JSC::jsString):

  • runtime/RegExp.cpp:

(JSC::RegExp::match):

  • runtime/RegExpCache.cpp:

(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):

  • runtime/RegExpConstructor.cpp:

(JSC::RegExpConstructor::getRightContext):

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::match):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncToString):

  • runtime/StringBuilder.h:

(JSC::StringBuilder::append):

  • runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h.

(JSC::):
(JSC::sumWithOverflow):
(JSC::tryMakeString):
(JSC::makeString):

  • runtime/StringObject.cpp:

(JSC::StringObject::getOwnPropertyNames):

  • runtime/StringPrototype.cpp:

(JSC::substituteBackreferencesSlow):
(JSC::localeCompare):
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncLink):
(JSC::trimString):

  • runtime/UString.cpp:

(JSC::UString::number):
(JSC::UString::ascii):
(JSC::UString::operator[]):
(JSC::UString::toDouble):
(JSC::UString::find):
(JSC::UString::rfind):
(JSC::UString::substr):
(JSC::operator==):
(JSC::operator<):
(JSC::operator>):
(JSC::UString::UTF8String):

  • runtime/UString.h:

(JSC::UString::UString):
(JSC::UString::adopt):
(JSC::UString::length):
(JSC::UString::characters):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
(JSC::UString::cost):
(JSC::operator==):
(JSC::operator!=):
(JSC::codePointCompare):
(JSC::UString::toArrayIndex):
(JSC::IdentifierRepHash::hash):
(WTF::):

  • yarr/RegexJIT.cpp:

(JSC::Yarr::jitCompileRegex):

  • yarr/RegexParser.h:

(JSC::Yarr::Parser::Parser):

JavaScriptGlue:

  • JSUtils.cpp:

(UStringToCFString):
(KJSValueToCFTypeInternal):

  • JavaScriptGlue.xcodeproj/project.pbxproj:

WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCSSStyleDeclarationCustom.cpp:

(WebCore::hasCSSPropertyNamePrefix):
(WebCore::cssPropertyName):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::setPort):

  • bindings/js/ScriptDebugServer.cpp:

(WebCore::ScriptDebugServer::dispatchDidParseSource):

  • bindings/js/ScriptString.h:

(WebCore::ScriptString::size):

  • bindings/js/ScriptValue.cpp:

(WebCore::jsToInspectorValue):

  • bindings/objc/WebScriptObject.mm:

(+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):

  • bridge/jni/jni_jsobject.mm:

(JavaJSObject::convertValueToJObject):

  • bridge/jni/jsc/JNIUtilityPrivate.cpp:

(JSC::Bindings::convertArrayInstanceToJavaArray):
(JSC::Bindings::convertValueToJValue):

  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::callObjCFallbackObject):

WebKit/mac:

  • WebView/WebScriptDebugger.mm:

(toNSString):

Location:
trunk/JavaScriptCore/API
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSClassRef.cpp

    r65104 r65177  
    114114{
    115115    // The empty string is shared across threads & is an identifier, in all other cases we should have done a deep copy in className(), below.
    116     ASSERT(!m_className.size() || !m_className.impl()->isIdentifier());
     116    ASSERT(!m_className.length() || !m_className.impl()->isIdentifier());
    117117
    118118    if (m_staticValues) {
     
    217217{
    218218    // Make a deep copy, so that the caller has no chance to put the original into IdentifierTable.
    219     return UString(m_className.data(), m_className.size());
     219    return UString(m_className.characters(), m_className.length());
    220220}
    221221
  • trunk/JavaScriptCore/API/OpaqueJSString.cpp

    r65104 r65177  
    3636{
    3737    if (!ustring.isNull())
    38         return adoptRef(new OpaqueJSString(ustring.data(), ustring.size()));
     38        return adoptRef(new OpaqueJSString(ustring.characters(), ustring.length()));
    3939    return 0;
    4040}
Note: See TracChangeset for help on using the changeset viewer.