[ESNext][BigInt] Implement support for "==" operation
authorticaiolima@gmail.com <ticaiolima@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2018 04:25:49 +0000 (04:25 +0000)
committerticaiolima@gmail.com <ticaiolima@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2018 04:25:49 +0000 (04:25 +0000)
commitc48f57a120efab0768ac85c7bba0758001a00cc1
treeb12b846f6488f77eef8d065e81b1a8ff570fbfa4
parent4e6f054a7c921c047b4ab5d70be7b0cb12c78d5b
[ESNext][BigInt] Implement support for "==" operation
https://bugs.webkit.org/show_bug.cgi?id=184474

Reviewed by Yusuke Suzuki.

JSTests:

* stress/big-int-equals-basic.js: Added.
* stress/big-int-equals-to-primitive-precedence.js: Added.
* stress/big-int-equals-wrapped-value.js: Added.

Source/JavaScriptCore:

This patch is implementing support of BigInt for equals operator
following the spec semantics[1].

[1] - https://tc39.github.io/proposal-bigint/#sec-abstract-equality-comparison

* runtime/JSBigInt.cpp:
(JSC::JSBigInt::parseInt):
(JSC::JSBigInt::stringToBigInt):
(JSC::JSBigInt::toString):
(JSC::JSBigInt::setDigit):
(JSC::JSBigInt::equalsToNumber):
(JSC::JSBigInt::compareToDouble):
* runtime/JSBigInt.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::equalSlowCaseInline):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/big-int-equals-basic.js [new file with mode: 0644]
JSTests/stress/big-int-equals-to-primitive-precedence.js [new file with mode: 0644]
JSTests/stress/big-int-equals-wrapped-value.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSBigInt.cpp
Source/JavaScriptCore/runtime/JSBigInt.h
Source/JavaScriptCore/runtime/JSCJSValueInlines.h