Bug 190799

Summary: [ESNext][BigInt] Implement support for "**"
Product: WebKit Reporter: Caio Lima <ticaiolima>
Component: JavaScriptCoreAssignee: Caio Lima <ticaiolima>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 179001    
Attachments:
Description Flags
WIP - Patch
none
WIP - Patch
none
Benchmarks
none
Patch
none
Patch
none
Benchmarks
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Caio Lima
Reported Monday, October 22, 2018 7:48:31 PM UTC
...
Attachments
WIP - Patch (43.94 KB, patch)
2019-01-07 11:05 PST, Caio Lima
no flags
WIP - Patch (43.93 KB, patch)
2019-01-07 13:07 PST, Caio Lima
no flags
Benchmarks (98.11 KB, text/plain)
2019-01-07 13:14 PST, Caio Lima
no flags
Patch (43.97 KB, patch)
2019-01-24 16:52 PST, Caio Lima
no flags
Patch (43.99 KB, patch)
2019-01-25 04:08 PST, Caio Lima
no flags
Benchmarks (97.02 KB, text/plain)
2019-01-25 04:32 PST, Caio Lima
no flags
Patch (44.83 KB, patch)
2019-02-17 15:56 PST, Caio Lima
no flags
Patch (48.63 KB, patch)
2019-03-11 05:56 PDT, Caio Lima
no flags
Patch (48.58 KB, patch)
2019-05-06 06:34 PDT, Caio Lima
no flags
Patch (48.26 KB, patch)
2019-05-26 14:15 PDT, Caio Lima
no flags
Patch (48.23 KB, patch)
2019-05-27 13:34 PDT, Caio Lima
no flags
Patch (48.23 KB, patch)
2019-06-03 10:52 PDT, Caio Lima
no flags
Caio Lima
Comment 1 Monday, January 7, 2019 7:05:33 PM UTC
Created attachment 358509 [details] WIP - Patch
Caio Lima
Comment 2 Monday, January 7, 2019 9:07:31 PM UTC
Created attachment 358518 [details] WIP - Patch
Caio Lima
Comment 3 Monday, January 7, 2019 9:14:02 PM UTC
Created attachment 358520 [details] Benchmarks This Patch is perf neutral in x86_64
Caio Lima
Comment 4 Friday, January 25, 2019 12:52:34 AM UTC
Caio Lima
Comment 5 Friday, January 25, 2019 12:08:31 PM UTC
Caio Lima
Comment 6 Friday, January 25, 2019 12:32:06 PM UTC
Created attachment 360105 [details] Benchmarks The patch is perf neutral.
Caio Lima
Comment 7 Sunday, February 17, 2019 11:56:14 PM UTC
Caio Lima
Comment 8 Monday, March 11, 2019 1:56:44 PM UTC
Caio Lima
Comment 9 Monday, May 6, 2019 2:34:10 PM UTC
Saam Barati
Comment 10 Monday, May 6, 2019 9:14:44 PM UTC
Comment on attachment 369121 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=369121&action=review LGTM overall. Some bugs I believe that are similar to ValueMod patch > Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:862 > + if (childX && childY && childX.isNumber() && childY.isNumber()) { > + if (!node->isBinaryUseKind(BigIntUse)) > + didFoldClobberWorld(); > + setConstant(node, jsDoubleNumber(operationMathPow(childX.asNumber(), childY.asNumber()))); > + break; > + } same comment as I had in ValueMod patch. I believe you need to ensure that the types of X and Y are valid given BigInt. > Source/JavaScriptCore/dfg/DFGOperations.cpp:545 > + if (WTF::holds_alternative<JSBigInt*>(leftNumeric) || WTF::holds_alternative<JSBigInt*>(rightNumeric)) { > + if (WTF::holds_alternative<JSBigInt*>(leftNumeric) && WTF::holds_alternative<JSBigInt*>(rightNumeric)) > + RELEASE_AND_RETURN(scope, JSValue::encode(JSBigInt::exponentiate(exec, WTF::get<JSBigInt*>(leftNumeric), WTF::get<JSBigInt*>(rightNumeric)))); Not related to this patch, but maybe we can make this type of pattern easier to read since it's so common in all the operations. Maybe this can be a followup. But if we had something like: bool doBigIntMath(variant a, variant b, doMath lambda, throw lambda or throw message) It returns false if both are *not* BigInt. Returns true otherwise. Throws an exception if 1 of 2 are big int, otherwise, returns lambda
Caio Lima
Comment 11 Sunday, May 26, 2019 10:15:39 PM UTC
Caio Lima
Comment 12 Monday, May 27, 2019 9:34:30 PM UTC
Saam Barati
Comment 13 Saturday, June 1, 2019 2:47:47 AM UTC
Comment on attachment 370705 [details] Patch r=me
Caio Lima
Comment 14 Monday, June 3, 2019 6:52:38 PM UTC
Caio Lima
Comment 15 Monday, June 3, 2019 7:03:34 PM UTC
(In reply to Saam Barati from comment #13) > Comment on attachment 370705 [details] > Patch > > r=me Thx for the review!
WebKit Commit Bot
Comment 16 Monday, June 3, 2019 7:42:41 PM UTC
Comment on attachment 371195 [details] Patch Clearing flags on attachment: 371195 Committed r246041: <https://trac.webkit.org/changeset/246041>
WebKit Commit Bot
Comment 17 Monday, June 3, 2019 7:42:42 PM UTC
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 18 Monday, June 3, 2019 7:44:45 PM UTC
Note You need to log in before you can comment on or make changes to this bug.