[webkit-reviews] review granted: [Bug 210892] [JSC] DFG compare should speculate BigInt well : [Attachment 397433] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 24 11:30:56 PDT 2020
Saam Barati <sbarati at apple.com> has granted Yusuke Suzuki <ysuzuki at apple.com>'s
request for review:
Bug 210892: [JSC] DFG compare should speculate BigInt well
https://bugs.webkit.org/show_bug.cgi?id=210892
Attachment 397433: Patch
https://bugs.webkit.org/attachment.cgi?id=397433&action=review
--- Comment #6 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 397433
--> https://bugs.webkit.org/attachment.cgi?id=397433
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=397433&action=review
nice. r=me
> Source/JavaScriptCore/runtime/JSBigInt.cpp:2033
> + return ComparisonResult::LessThan;
nit: I know this is proven given all other things, but maybe before this, add
an
"ASSERT(!ySign);"
> Source/JavaScriptCore/runtime/JSBigInt.h:293
> +ALWAYS_INLINE JSBigInt::ComparisonResult
swapBigIntCompareResult(JSBigInt::ComparisonResult comparisonResult)
name nit:
swap => invert
> Source/JavaScriptCore/runtime/JSBigInt.h:301
> + default:
> + return comparisonResult;
nit:
can we define all cases here, just so we get a compile error in the future?
> Source/JavaScriptCore/runtime/Operations.h:314
> + JSValue bigIntValue = JSBigInt::stringToBigInt(globalObject,
asString(primValue)->value(globalObject));
don't we need an exception check after ->value() on string?
More information about the webkit-reviews
mailing list