on master help sign in
javascript: use strings for bigints to pervent overflow
commit270cbcaca2027c2d50c4255b05ab2f814f4f454f authorraichoo <raichoo@googlemail.com> dateThu 10 Oct 2013, 01:29 (13 years ago) parenta976e30
1 file changed+1−1
src/IRTS/CodegenJavaScript.hs+1−1
src/IRTS/CodegenJavaScript.hs+1−1
@@ -482,7 +482,7 @@ translateConstant (AType ATFloat) = JSType JSFloatTy
482482translateConstant (AType (ATInt ITChar)) = JSType JSCharTy
483483translateConstant PtrType = JSType JSPtrTy
484484translateConstant Forgot = JSType JSForgotTy
485−translateConstant (BI i) = jsBigInt $ JSNum (JSInteger i)
485+translateConstant (BI i) = jsBigInt $ JSString (show i)
486486translateConstant c =
487487 JSError $ "Unimplemented Constant: " ++ show c
488488