[Webkit-unassigned] [Bug 32828] WTF should have an arraysize macro
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Oct 24 09:14:25 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=32828
--- Comment #25 from Patrick R. Gansterer <paroga at paroga.com> 2010-10-24 09:14:24 PST ---
(In reply to comment #24)
> (From update of attachment 71680 [details])
> > JavaScriptCore/wtf/Platform.h:-570
> > -/* _countof is only included in CE6; for CE5 we need to define it ourself */
> > -#ifndef _countof
> > -#define _countof(x) (sizeof(x) / sizeof((x)[0]))
> > -#endif
> > -
>
> I still think this is needed for WebCore, right?
It's not really used at the moment, so it won't be a problem, but it's cleaner to remove it with the WebCore changes.
> > JavaScriptCore/wtf/StdLibExtras.h:94
> > +template<typename TO, typename FROM>
> > +inline TO bitwise_cast(FROM from)
>
> I would prefer this change be made in a separate patch. It has potential performance implications, so making it a separate patch will allow for better bisecting in the future in case it has some effect.
>
> You can bundle it with the style indentation fixes as well.
>
> > JavaScriptCore/wtf/StdLibExtras.h:111
> > +// Returns a count of the number of bits set in 'bits'.
> > +inline size_t bitCount(unsigned bits)
> > +{
> > + bits = bits - ((bits >> 1) & 0x55555555);
> > + bits = (bits & 0x33333333) + ((bits >> 2) & 0x33333333);
> > + return (((bits + (bits >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24;
> > +}
>
> Please put the style changes in a different patch. You can bundle it with the style change and "inline" change above.
Created bug 48208.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list