[webkit-reviews] review granted: [Bug 170961] r211670 broke double to int conversion. : [Attachment 307472] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 19 07:44:31 PDT 2017


Mark Lam <mark.lam at apple.com> has granted Yusuke Suzuki
<utatane.tea at gmail.com>'s request for review:
Bug 170961: r211670 broke double to int conversion.
https://bugs.webkit.org/show_bug.cgi?id=170961

Attachment 307472: Patch

https://bugs.webkit.org/attachment.cgi?id=307472&action=review




--- Comment #12 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 307472
  --> https://bugs.webkit.org/attachment.cgi?id=307472
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=307472&action=review

r=me with fixes.

> Source/JavaScriptCore/ChangeLog:11
> +	   and fixes kraken pbkdf2 regression.

Can you add "on linux" after "regression" to clarify where this can be
observed?

> Source/JavaScriptCore/runtime/MathCommon.h:36
> +int32_t JIT_OPERATION operationToInt32SensibleSlow(double) WTF_INTERNAL;

You need to revert the DFG and FTL code back to using
operationToInt32SensibleSlow() too.

> Source/JavaScriptCore/runtime/MathCommon.h:156
> +    return bits < 0 ? -static_cast<int32_t>(result) :
static_cast<int32_t>(result);

Let's make bits uint64_t and only cast it to int64_t here instead for the sign
check.	This will reduce the amount of casting in this function.  It also makes
it consistent that we do all our bit manipulation on unsigned bits, and only
re-apply the sign at the end.


More information about the webkit-reviews mailing list