RESOLVED FIXED 190799
[ESNext][BigInt] Implement support for "**"
https://bugs.webkit.org/show_bug.cgi?id=190799
Summary [ESNext][BigInt] Implement support for "**"
Caio Lima
Reported 2018-10-22 11:48:31 PDT
...
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 2019-01-07 11:05:33 PST
Created attachment 358509 [details] WIP - Patch
Caio Lima
Comment 2 2019-01-07 13:07:31 PST
Created attachment 358518 [details] WIP - Patch
Caio Lima
Comment 3 2019-01-07 13:14:02 PST
Created attachment 358520 [details] Benchmarks This Patch is perf neutral in x86_64
Caio Lima
Comment 4 2019-01-24 16:52:34 PST
Caio Lima
Comment 5 2019-01-25 04:08:31 PST
Caio Lima
Comment 6 2019-01-25 04:32:06 PST
Created attachment 360105 [details] Benchmarks The patch is perf neutral.
Caio Lima
Comment 7 2019-02-17 15:56:14 PST
Caio Lima
Comment 8 2019-03-11 05:56:44 PDT
Caio Lima
Comment 9 2019-05-06 06:34:10 PDT
Saam Barati
Comment 10 2019-05-06 13:14:44 PDT
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 2019-05-26 14:15:39 PDT
Caio Lima
Comment 12 2019-05-27 13:34:30 PDT
Saam Barati
Comment 13 2019-05-31 18:47:47 PDT
Comment on attachment 370705 [details] Patch r=me
Caio Lima
Comment 14 2019-06-03 10:52:38 PDT
Caio Lima
Comment 15 2019-06-03 11:03:34 PDT
(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 2019-06-03 11:42:41 PDT
Comment on attachment 371195 [details] Patch Clearing flags on attachment: 371195 Committed r246041: <https://trac.webkit.org/changeset/246041>
WebKit Commit Bot
Comment 17 2019-06-03 11:42:42 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 18 2019-06-03 11:44:45 PDT
Note You need to log in before you can comment on or make changes to this bug.