[Webkit-unassigned] [Bug 129479] Implement Number.prototype.clz()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 28 06:47:34 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=129479
--- Comment #2 from Anders Carlsson <andersca at apple.com> 2014-02-28 06:44:40 PST ---
(From update of attachment 225453)
View in context: https://bugs.webkit.org/attachment.cgi?id=225453&action=review
> Source/JavaScriptCore/runtime/NumberPrototype.cpp:472
> + int zeroCount = 0;
> + for (int i = 31; i >= 0; i--) {
> + if (!(number >> i))
> + zeroCount++;
> + else
> + break;
> + }
> + return JSValue::encode(jsString(exec, String::numberToStringECMAScript(zeroCount)));
I think this should be a separate function and also use __builtin_clz when building with compilers that support it (GCC, clang).
--
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