Ignore:
Timestamp:
Apr 3, 2010, 11:53:46 PM (15 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=37068
Change UString to use a 0 rep for null strings instead of a null object.

Reviewed by Oliver Hunt.

No performance impact.

(JSC::InternalFunction::InternalFunction):

  • runtime/JSString.h:

(JSC::RopeBuilder::JSString):

  • runtime/UString.cpp:

(JSC::initializeUString):

  • runtime/UString.h:

(JSC::UString::UString):
(JSC::UString::data):
(JSC::UString::size):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::cost):

File:
1 edited

Legend:

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

    r56864 r57055  
    5959
    6060// The null string is immutable, except for refCount.
    61 UString::Rep* UString::s_nullRep;
    6261UString* UString::s_nullUString;
    6362
     
    6867    UStringImpl::empty();
    6968
    70     UString::s_nullRep = new UStringImpl(0, 0, UStringImpl::ConstructStaticString);
    7169    UString::s_nullUString = new UString;
    7270}
Note: See TracChangeset for help on using the changeset viewer.