on master help sign in
added prim op LFloatInt ITBig
commit1fa3bbf00412aa49c31cc10142fa66caa26cf7c8 authorRui Barreiro <rui.barreiro@gmail.com> dateFri 30 Jun 2017, 22:02 (9 years ago) parentea65347
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"