Title: [243544] trunk
- Revision
- 243544
- Author
- [email protected]
- Date
- 2019-03-27 09:12:22 -0700 (Wed, 27 Mar 2019)
Log Message
Layout Test js/math-clz32.html is failing
https://bugs.webkit.org/show_bug.cgi?id=196209
Reviewed by Ross Kirsling.
Source/WTF:
Use the correct number of loop iterations when counting leading zeros. Also, the
count was off by one for the Win64 case.
* wtf/MathExtras.h:
(WTF::clz):
LayoutTests:
* platform/win/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (243543 => 243544)
--- trunk/LayoutTests/ChangeLog 2019-03-27 15:46:26 UTC (rev 243543)
+++ trunk/LayoutTests/ChangeLog 2019-03-27 16:12:22 UTC (rev 243544)
@@ -1,3 +1,12 @@
+2019-03-27 Per Arne Vollan <[email protected]>
+
+ Layout Test js/math-clz32.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=196209
+
+ Reviewed by Ross Kirsling.
+
+ * platform/win/TestExpectations:
+
2019-03-26 Simon Fraser <[email protected]>
[iOS WK2] Fixed elements in frames can be misplaced sometimes
Modified: trunk/LayoutTests/platform/win/TestExpectations (243543 => 243544)
--- trunk/LayoutTests/platform/win/TestExpectations 2019-03-27 15:46:26 UTC (rev 243543)
+++ trunk/LayoutTests/platform/win/TestExpectations 2019-03-27 16:12:22 UTC (rev 243544)
@@ -4303,4 +4303,3 @@
webkit.org/b/195461 http/tests/referrer-policy-iframe/origin/same-origin.html [ Failure ]
webkit.org/b/195461 http/tests/referrer-policy-iframe/unsafe-url/cross-origin-http.https.html [ Failure ]
-webkit.org/b/196209 js/math-clz32.html [ Failure ]
Modified: trunk/Source/WTF/ChangeLog (243543 => 243544)
--- trunk/Source/WTF/ChangeLog 2019-03-27 15:46:26 UTC (rev 243543)
+++ trunk/Source/WTF/ChangeLog 2019-03-27 16:12:22 UTC (rev 243544)
@@ -1,3 +1,16 @@
+2019-03-27 Per Arne Vollan <[email protected]>
+
+ Layout Test js/math-clz32.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=196209
+
+ Reviewed by Ross Kirsling.
+
+ Use the correct number of loop iterations when counting leading zeros. Also, the
+ count was off by one for the Win64 case.
+
+ * wtf/MathExtras.h:
+ (WTF::clz):
+
2019-03-26 Keith Rollin <[email protected]>
Inhibit CFNetwork logging in private sessions
Modified: trunk/Source/WTF/wtf/MathExtras.h (243543 => 243544)
--- trunk/Source/WTF/wtf/MathExtras.h 2019-03-27 15:46:26 UTC (rev 243543)
+++ trunk/Source/WTF/wtf/MathExtras.h 2019-03-27 16:12:22 UTC (rev 243544)
@@ -619,12 +619,12 @@
inline unsigned clz(T value)
{
constexpr unsigned bitSize = sizeof(T) * CHAR_BIT;
- constexpr unsigned bitSize64 = sizeof(uint64_t) * CHAR_BIT;
using UT = typename std::make_unsigned<T>::type;
UT uValue = value;
#if COMPILER(GCC_COMPATIBLE)
+ constexpr unsigned bitSize64 = sizeof(uint64_t) * CHAR_BIT;
if (uValue)
return __builtin_clzll(uValue) - (bitSize64 - bitSize);
return bitSize;
@@ -634,15 +634,14 @@
// _BitScanReverse64 is defined in X86_64 and ARM in MSVC supported environments.
unsigned long ret = 0;
if (_BitScanReverse64(&ret, uValue))
- return bitSize - ret;
+ return bitSize - 1 - ret;
return bitSize;
#else
unsigned zeroCount = 0;
- for (int i = bitSize64 - 1; i >= 0; i--) {
- if (!(static_cast<uint64_t>(uValue) >> i))
- zeroCount++;
- else
+ for (int i = bitSize - 1; i >= 0; i--) {
+ if (uValue >> i)
break;
+ zeroCount++;
}
return zeroCount;
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes