[ESNext][BigInt] Implement support for "/" operation
authorticaiolima@gmail.com <ticaiolima@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 04:27:28 +0000 (04:27 +0000)
committerticaiolima@gmail.com <ticaiolima@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 04:27:28 +0000 (04:27 +0000)
commita01ba172929eff852beb9e7abf94cac211c42964
tree115c498ebd1f522dda626080fb7bde0df176d44c
parent0cda3d5c770cd5c176ae3dcd64e1a778f12626ed
[ESNext][BigInt] Implement support for "/" operation
https://bugs.webkit.org/show_bug.cgi?id=183996

Reviewed by Yusuke Suzuki.

JSTests:

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

Source/JavaScriptCore:

This patch is introducing the support for BigInt into divide
operation int LLInt and JIT layers.

* dfg/DFGOperations.cpp:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/JSBigInt.cpp:
(JSC::JSBigInt::divide):
(JSC::JSBigInt::copy):
(JSC::JSBigInt::unaryMinus):
(JSC::JSBigInt::absoluteCompare):
(JSC::JSBigInt::absoluteDivLarge):
(JSC::JSBigInt::productGreaterThan):
(JSC::JSBigInt::inplaceAdd):
(JSC::JSBigInt::inplaceSub):
(JSC::JSBigInt::inplaceRightShift):
(JSC::JSBigInt::specialLeftShift):
(JSC::JSBigInt::digit):
(JSC::JSBigInt::setDigit):
* runtime/JSBigInt.h:

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