Ignore:
Timestamp:
Aug 18, 2010, 1:56:49 AM (15 years ago)
Author:
[email protected]
Message:

Rename UString::substr to substringSharingImpl, add to WTF::String.
Now WTF::String can do everything that JSC::UString can do!

Rubber stamped by Sam Weinig.

(JSC::escapeQuotes):

  • bytecompiler/NodesCodegen.cpp:

(JSC::substitute):

  • parser/SourceProvider.h:

(JSC::UStringSourceProvider::getRange):

  • runtime/FunctionPrototype.cpp:

(JSC::insertSemicolonIfNeeded):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::parseInt):

  • runtime/JSONObject.cpp:

(JSC::gap):
(JSC::Stringifier::indent):
(JSC::Stringifier::unindent):

  • runtime/JSString.cpp:

(JSC::JSString::replaceCharacter):

  • runtime/NumberPrototype.cpp:

(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncReplace):
(JSC::trimString):

  • runtime/UString.cpp:

(JSC::UString::substringSharingImpl):

  • runtime/UString.h:
  • wtf/text/WTFString.cpp:

(WTF::String::substringSharingImpl):

  • wtf/text/WTFString.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSString.cpp

    r65588 r65593  
    113113        if (matchPosition == notFound)
    114114            return JSValue(this);
    115         return jsString(exec, m_value.substr(0, matchPosition), replacement, m_value.substr(matchPosition + 1));
     115        return jsString(exec, m_value.substringSharingImpl(0, matchPosition), replacement, m_value.substringSharingImpl(matchPosition + 1));
    116116    }
    117117
     
    148148        }
    149149
    150         builder.append(UString(string).substr(0, matchPosition));
     150        builder.append(UString(string).substringSharingImpl(0, matchPosition));
    151151        if (replacement.length())
    152152            builder.append(replacement);
    153         builder.append(UString(string).substr(matchPosition + 1));
     153        builder.append(UString(string).substringSharingImpl(matchPosition + 1));
    154154        matchString = 0;
    155155    }
Note: See TracChangeset for help on using the changeset viewer.