Ignore:
Timestamp:
Sep 1, 2011, 1:04:34 PM (14 years ago)
Author:
[email protected]
Message:

Remove simple usage of UString::characters() from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=67340

In preparation to allowing StringImpl to be backed by 8 bit
characters when appropriate, we need to eliminate or change the
usage of StringImpl::characters(). Most of the changes below
change s->characters()[0] to s[0].

Reviewed by Geoffrey Garen.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::keyForCharacterSwitch):

  • bytecompiler/NodesCodegen.cpp:

(JSC::processClauseList):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • runtime/Identifier.cpp:

(JSC::Identifier::addSlowCase):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::jsToNumber):
(JSC::parseFloat):

  • runtime/JSString.cpp:

(JSC::JSString::substringFromRope):

  • runtime/JSString.h:

(JSC::jsSingleCharacterSubstring):
(JSC::jsString):
(JSC::jsSubstring):
(JSC::jsOwnedString):

  • runtime/RegExp.cpp:

(JSC::regExpFlags):

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::operator[]):

File:
1 edited

Legend:

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

    r91194 r94336  
    195195    if (substringLength == 1) {
    196196        ASSERT(substringFiberCount == 1);
    197         UChar c = substringFibers[0].characters()[0];
     197        UChar c = substringFibers[0][0];
    198198        if (c <= maxSingleCharacterString)
    199199            return globalData->smallStrings.singleCharacterString(globalData, c);
Note: See TracChangeset for help on using the changeset viewer.