[ESNext][BigInt] Implement support for "%" operation
authorticaiolima@gmail.com <ticaiolima@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 May 2018 16:40:17 +0000 (16:40 +0000)
committerticaiolima@gmail.com <ticaiolima@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 May 2018 16:40:17 +0000 (16:40 +0000)
commitcac3e0380df77f5086a5aa7f9e379a62e5229155
treea5405856a82496d31fe6017878f85065ab3e3084
parent81488a8b94be830b61351534544b77a1ac735ef3
[ESNext][BigInt] Implement support for "%" operation
https://bugs.webkit.org/show_bug.cgi?id=184327

Reviewed by Yusuke Suzuki.

JSTests:

* bigIntTests.yaml:
* stress/big-int-mod-memory-stress.js: Added.
* stress/big-int-mod-to-primitive-precedence.js: Added.
* stress/big-int-mod-to-primitive.js: Added.
* stress/big-int-mod-type-error.js: Added.
* stress/big-int-mod-wrapped-value.js: Added.
* stress/big-int-mod.js: Added.

Source/JavaScriptCore:

We are introducing the support of BigInt into remainder (a.k.a mod)
operation.

* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/JSBigInt.cpp:
(JSC::JSBigInt::remainder):
(JSC::JSBigInt::rightTrim):
* runtime/JSBigInt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
JSTests/ChangeLog
JSTests/bigIntTests.yaml
JSTests/stress/big-int-mod-jit.js [new file with mode: 0644]
JSTests/stress/big-int-mod-memory-stress.js [new file with mode: 0644]
JSTests/stress/big-int-mod-to-primitive-precedence.js [new file with mode: 0644]
JSTests/stress/big-int-mod-to-primitive.js [new file with mode: 0644]
JSTests/stress/big-int-mod-type-error.js [new file with mode: 0644]
JSTests/stress/big-int-mod-wrapped-value.js [new file with mode: 0644]
JSTests/stress/big-int-mod.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
Source/JavaScriptCore/runtime/JSBigInt.cpp
Source/JavaScriptCore/runtime/JSBigInt.h