Ignore:
Timestamp:
Jan 18, 2010, 9:51:40 PM (15 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=33731
Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).

Patch by Gavin Barraclough <[email protected]> on 2010-01-18
Reviewed by Oliver Hunt.

This break the OS X Leaks tool. Instead, free up some more bits from the refCount.

  • runtime/UStringImpl.cpp:

(JSC::UStringImpl::sharedBuffer):
(JSC::UStringImpl::~UStringImpl):

  • runtime/UStringImpl.h:

(JSC::UStringImpl::cost):
(JSC::UStringImpl::checkConsistency):
(JSC::UStringImpl::UStringImpl):
(JSC::UStringImpl::bufferOwnerString):
(JSC::UStringImpl::):

  • wtf/StringHashFunctions.h:

(WTF::stringHash):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/StringHashFunctions.h

    r53400 r53454  
    6161    hash ^= hash << 10;
    6262
    63     hash &= 0x7fffffff;
    64 
    6563    // this avoids ever returning a hash code of 0, since that is used to
    6664    // signal "hash not computed yet", using a value that is likely to be
    6765    // effectively the same as 0 when the low bits are masked
    6866    if (hash == 0)
    69         hash = 0x40000000;
     67        hash = 0x80000000;
    7068
    7169    return hash;
     
    10199    hash ^= hash << 10;
    102100
    103     hash &= 0x7fffffff;
    104 
    105101    // this avoids ever returning a hash code of 0, since that is used to
    106102    // signal "hash not computed yet", using a value that is likely to be
    107103    // effectively the same as 0 when the low bits are masked
    108104    if (hash == 0)
    109         hash = 0x40000000;
     105        hash = 0x80000000;
    110106
    111107    return hash;
     
    142138    hash ^= hash << 10;
    143139
    144     hash &= 0x7fffffff;
    145 
    146140    // This avoids ever returning a hash code of 0, since that is used to
    147141    // signal "hash not computed yet", using a value that is likely to be
    148142    // effectively the same as 0 when the low bits are masked.
    149143    if (hash == 0)
    150         hash = 0x40000000;
     144        hash = 0x80000000;
    151145
    152146    return hash;
Note: See TracChangeset for help on using the changeset viewer.