Fix a couple of problems with UntypedPtrAndBitfield.

Reviewed by Sam Weinig.

Add a m_leaksPtr to reduce false positives from leaks in debug builds
(this isn't perfect because we'd like a solution for release builds,
but this is now at least as good as a PtrAndFlags would be).

Switch SmallStringsto use a regular string for the base, rather than
a static one.  UntypedPtrAndBitfield assumes all strings are at least
8 byte aligned; this migt not be true of static strings.  Shared buffers
are heap allocated, as are all UStringImpls other than static strings.
Static strings cannot end up being the owner string of substrings,
since the only static strings are length 0.

* runtime/SmallStrings.cpp:
(JSC::SmallStringsStorage::SmallStringsStorage):
* runtime/UStringImpl.h:
(JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
(JSC::UStringImpl::UStringImpl):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3 files changed