JSC::UString and WTF::String should use size_t instead of unsigned
https://bugs.webkit.org/show_bug.cgi?id=49637
Summary JSC::UString and WTF::String should use size_t instead of unsigned
David Kilzer (:ddkilzer)
Reported 2010-11-16 18:06:57 PST
JSC::UString and WTF::String should use size_t instead of unsigned since unsigned is only 4 bytes on 64-bit, but size_t is 8 bytes.
Attachments
David Kilzer (:ddkilzer)
Comment 1 2010-11-16 18:07:21 PST
Darin Adler
Comment 2 2010-11-16 18:11:09 PST
I suspect this will make every string object a bit larger on 64-bit systems. Do the benefits outweigh that cost?
Chris Evans
Comment 3 2010-11-17 23:11:25 PST
The current use of "unsigned" even on 64-bit seems very deliberate: StringImpl.cpp:COMPILE_ASSERT(sizeof(StringImpl) == 2 * sizeof(int) + 3 * sizeof(void*), StringImpl_should_stay_small); Given that we're careful to not truncate lengths, I see costs but not many benefits.
Note You need to log in before you can comment on or make changes to this bug.