[webkit-reviews] review granted: [Bug 233905] TypedArray prototype set should go down the fast path when using non clamped integer types of the same byte size : [Attachment 446106] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 6 18:33:32 PST 2021


Keith Miller <keith_miller at apple.com> has granted Saam Barati
<sbarati at apple.com>'s request for review:
Bug 233905: TypedArray prototype set should go down the fast path when using
non clamped integer types of the same byte size
https://bugs.webkit.org/show_bug.cgi?id=233905

Attachment 446106: patch

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




--- Comment #2 from Keith Miller <keith_miller at apple.com> ---
Comment on attachment 446106
  --> https://bugs.webkit.org/attachment.cgi?id=446106
patch

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

> Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:283
> +    if (isInt(Adaptor::typeValue) && isInt(ci->typedArrayStorageType) &&
!isClamped(Adaptor::typeValue) && JSC::elementSize(Adaptor::typeValue) ==
JSC::elementSize(ci->typedArrayStorageType))

Nit: Why do you need the isClamped check? Shouldn't that follow from the if
above and the fact that the elementSizes are the same? It might still be worth
having as an ASSERT in the body of this if though.


More information about the webkit-reviews mailing list