on master help sign in
Merge pull request #3894 from rbarreiro/add_LFloatInt_ITBig

added prim op LFloatInt ITBig

commit5a28aa8f0fc9996fb7deed9bc76ddad1f4f270e2 authorNiklas Larsson <metaniklas@gmail.com> dateSat 1 Jul 2017, 14:18 (9 years ago) parent052680d1fa3bbf
1 file changed+1
src/IRTS/JavaScript/PrimOp.hs+1
src/IRTS/JavaScript/PrimOp.hs+1
@@ -200,6 +200,7 @@ primDB =
200200 , item (LIntFloat ITNative) False PTAny $ head
201201 , item (LIntFloat ITBig) True PTAny $ JsForeign "%0.intValue()"
202202 , item (LFloatInt ITNative) False PTAny $ JsForeign "%0|0"
203+ , item (LFloatInt ITBig) True PTAny $ JsForeign "new $JSRTS.jsbn.BigInteger(Math.trunc(%0)+ '')"
203204 , item (LIntStr ITNative) False PTAny $ JsForeign "''+%0"
204205 , item (LIntStr ITBig) True PTAny $ JsForeign "%0.toString()"
205206 , item (LStrInt ITNative) False PTAny $ JsForeign "parseInt(%0)|0"