[webkit-reviews] review denied: [Bug 197816] bitCount() should use popcount where available : [Attachment 369653] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat May 11 16:49:00 PDT 2019
Sam Weinig <sam at webkit.org> has denied Robin Morisset <rmorisset at apple.com>'s
request for review:
Bug 197816: bitCount() should use popcount where available
https://bugs.webkit.org/show_bug.cgi?id=197816
Attachment 369653: Patch
https://bugs.webkit.org/attachment.cgi?id=369653&action=review
--- Comment #4 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 369653
--> https://bugs.webkit.org/attachment.cgi?id=369653
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=369653&action=review
> Source/WTF/ChangeLog:9
> + * wtf/StdLibExtras.h:
> + (WTF::bitCount):
Do we have any tests for bitCount? Might be a good time to add one, make sure
there is no weirdness around the edge cases (e.g. 0 and MAX_UINT).
> Source/WTF/wtf/StdLibExtras.h:157
> +#if COMPILER(GCC_COMPATIBLE)
The preferred way to do this would be to add a
WTF_COMPILER_SUPPORTS_BUILTIN_POPCOUNT to Compiler.h, and then do a
COMPILER_SUPPORTS(BUILTIN_POPCOUNT) check here. That way, if we ever change/add
compilers, there is one place were we can define it's feature set.
More information about the webkit-reviews
mailing list