[ESNext][BigInt] Implement support for "=<" and ">=" relational operation
authorticaiolima@gmail.com <ticaiolima@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2018 03:30:22 +0000 (03:30 +0000)
committerticaiolima@gmail.com <ticaiolima@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2018 03:30:22 +0000 (03:30 +0000)
commit90dbf74b29e6010be25e172a7712b543c2d4fc07
tree1e7a39e2df57f7828a992239b66da30fead80e8f
parentf7d2d4f8983165933de079e49df76de775372107
[ESNext][BigInt] Implement support for "=<" and ">=" relational operation
https://bugs.webkit.org/show_bug.cgi?id=185929

Reviewed by Yusuke Suzuki.

JSTests:

* bigIntTests.yaml:
* stress/big-int-greater-than-or-equal-jit.js: Added.
* stress/big-int-greater-than-or-equal-order-of-evaluation.js: Added.
* stress/big-int-greater-than-or-equal-wrapped-values.js: Added.
* stress/big-int-greater-than-or-equal.js: Added.
* stress/big-int-less-than-or-equal-general.js: Added.
* stress/big-int-less-than-or-equal-jit.js: Added.
* stress/big-int-less-than-or-equal-order-of-evaluation.js: Added.
* stress/big-int-less-than-or-equal-wrapped-values.js: Added.

Source/JavaScriptCore:

This patch is introducing support to BigInt operands into ">=" and
"<=" operators.
Here we introduce ```bigIntCompareResult``` that is a helper function
to reuse code between "less than" and "less than or equal" operators.

* runtime/JSBigInt.h:
* runtime/Operations.h:
(JSC::bigIntCompareResult):
(JSC::bigIntCompare):
(JSC::jsLess):
(JSC::jsLessEq):
(JSC::bigIntCompareLess): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
JSTests/ChangeLog
JSTests/bigIntTests.yaml
JSTests/stress/big-int-greater-than-or-equal-jit.js [new file with mode: 0644]
JSTests/stress/big-int-greater-than-or-equal-order-of-evaluation.js [new file with mode: 0644]
JSTests/stress/big-int-greater-than-or-equal-wrapped-values.js [new file with mode: 0644]
JSTests/stress/big-int-greater-than-or-equal.js [new file with mode: 0644]
JSTests/stress/big-int-less-than-or-equal-general.js [new file with mode: 0644]
JSTests/stress/big-int-less-than-or-equal-jit.js [new file with mode: 0644]
JSTests/stress/big-int-less-than-or-equal-order-of-evaluation.js [new file with mode: 0644]
JSTests/stress/big-int-less-than-or-equal-wrapped-values.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSBigInt.h
Source/JavaScriptCore/runtime/Operations.h