[JSC] Add fast path for BigInt32 left-shift
Created attachment 397581 [details] Patch
Comment on attachment 397581 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397581&action=review > Source/JavaScriptCore/runtime/Operations.h:776 > + int64_t result64 = static_cast<int64_t>(leftInt32) << rightInt32; you need to check if this is a left shift, right?
Comment on attachment 397581 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397581&action=review Nice. r=me >> Source/JavaScriptCore/runtime/Operations.h:776 >> + int64_t result64 = static_cast<int64_t>(leftInt32) << rightInt32; > > you need to check if this is a left shift, right? sorry, I missed the above !isLeft branch
Comment on attachment 397581 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397581&action=review > Source/JavaScriptCore/runtime/Operations.h:765 > rightInt32 = -rightInt32; BTW, while this is completely separate issue from this, is this right? What happens if rightInt32 is INT32_MIN?
Comment on attachment 397581 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397581&action=review > Source/JavaScriptCore/runtime/Operations.h:-770 > - return jsBigInt32(leftInt32 >> std::min(rightInt32, 31)); I thought this is right in terms of int32 spec, but it seems that BigInt is not using rounding. So this is wrong. Will just use std::min.
Created attachment 397582 [details] Patch for landing
Created attachment 397583 [details] Patch for landing
Created attachment 397584 [details] Patch for landing
Committed r260711: <https://trac.webkit.org/changeset/260711>
<rdar://problem/62377699>