fixed LFloatInt primitive
commit487c639daab42eefd000ee8a57da2faaccb59f54
authorRui Barreiro <rui.barreiro@gmail.com>
dateMon 8 May 2017, 09:28 (9 years ago)
parentcb4f9e6
src/IRTS/JavaScript/Codegen.hs+1−1
@@ -566,7 +566,7 @@ cgOp (LIntStr ITBig) [x] =
566566 do
567567 setUsedITBig
568568 pure $ JsForeign "%0.toString()" [x]
569−cgOp (LFloatInt ITNative) [x] = pure $ JsForeign "%x|0" [x]
569+cgOp (LFloatInt ITNative) [x] = pure $ JsForeign "%0|0" [x]
570570cgOp (LStrInt ITNative) [x] = pure $ JsForeign "parseInt(%0)|0" [x]
571571cgOp (LStrFloat) [x] = pure $ JsApp "parseFloat" [x]
572572cgOp (LChInt ITNative) [x] = pure $ JsForeign "%0.charCodeAt(0)|0" [x]