Refactor clz/ctz and fix getLSBSet.
Created attachment 365770 [details] Patch
Comment on attachment 365770 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=365770&action=review > Source/WTF/ChangeLog:12 > + numeric type. Since these methods work on any type we don't need > + to have an, incorrect, implementation of getLSBSet. This patch > + also adds getMSBSet as there may be users who want that in the > + future. I'd explain a bit more here. - The old implementation of getLSBSet was really getMSBSet > Tools/TestWebKitAPI/Tests/WTF/MathExtras.cpp:435 > nit: I think writing out these numbers in binary would make it easier to follow.
Created attachment 365774 [details] Patch
Created attachment 365775 [details] Patch
Created attachment 365822 [details] Patch for landing
Comment on attachment 365822 [details] Patch for landing Clearing flags on attachment: 365822 Committed r243418: <https://trac.webkit.org/changeset/243418>
All reviewed patches have been landed. Closing bug.
<rdar://problem/49191697>
It breaks x64 Windows builds. https://build.webkit.org/builders/WinCairo%2064-bit%20WKL%20Debug%20%28Build%29/builds/7601/steps/compile-webkit/logs/stdio > [21/1544] Building CXX object Tools\TestWebKitAPI\CMakeFiles\TestWTFLib.dir\Tests\WTF\MathExtras.cpp.obj > FAILED: Tools/TestWebKitAPI/CMakeFiles/TestWTFLib.dir/Tests/WTF/MathExtras.cpp.obj > "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\Hostx64\x64\cl.exe" (...) /FdTools\TestWebKitAPI\CMakeFiles\TestWTFLib.dir\ /FS -c ..\..\Tools\TestWebKitAPI\Tests\WTF\MathExtras.cpp > C:\WebKit-BuildWorker\wincairo-wkl-debug\build\WebKitBuild\Debug\DerivedSources\ForwardingHeaders\wtf/MathExtras.h(636): error C2065: 'number': undeclared identifier
Re-opened since this is blocked by bug 196191
(In reply to Fujii Hironori from comment #9) > It breaks x64 Windows builds. > > https://build.webkit.org/builders/WinCairo%2064- > bit%20WKL%20Debug%20%28Build%29/builds/7601/steps/compile-webkit/logs/stdio > > > [21/1544] Building CXX object Tools\TestWebKitAPI\CMakeFiles\TestWTFLib.dir\Tests\WTF\MathExtras.cpp.obj > > FAILED: Tools/TestWebKitAPI/CMakeFiles/TestWTFLib.dir/Tests/WTF/MathExtras.cpp.obj > > "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\Hostx64\x64\cl.exe" (...) /FdTools\TestWebKitAPI\CMakeFiles\TestWTFLib.dir\ /FS -c ..\..\Tools\TestWebKitAPI\Tests\WTF\MathExtras.cpp > > C:\WebKit-BuildWorker\wincairo-wkl-debug\build\WebKitBuild\Debug\DerivedSources\ForwardingHeaders\wtf/MathExtras.h(636): error C2065: 'number': undeclared identifier Whoops, I think it's a simple fix. I forgot to change the variable name for windows...
Should hopefully be fixed with: https://trac.webkit.org/changeset/243429