added LIntFloat ITBig to the js backend
commitd98e5f2a6f7d941b06bc2d3713d22b40c6fbe4f4
authorRui Barreiro <rui.barreiro@gmail.com>
dateWed 10 May 2017, 19:05 (9 years ago)
parentb2c56c3
src/IRTS/JavaScript/Codegen.hs+4
@@ -592,6 +592,10 @@ cgOp (LZExt ITNative ITBig) [x] =
592592 setUsedITBig
593593 pure $ JsForeign "new jsbn.BigInteger(String(%0))" [x]
594594cgOp (LIntFloat ITNative) [x] = pure $ x
595+cgOp (LIntFloat ITBig) [x] =
596+ do
597+ setUsedITBig
598+ pure $ JsForeign "%0.intValue()" [x]
595599cgOp LFACos [x] = pure $ JsApp "Math.acos" [x]
596600cgOp LFATan [x] = pure $ JsApp "Math.atan" [x]
597601cgOp LFCos [x] = pure $ JsApp "Math.cos" [x]