on master help sign in
javascript: use strings for bigints to pervent overflow
270cbcaraichoo
src/IRTS/CodegenJavaScript.hs+1−1
@@ -482,7 +482,7 @@ translateConstant (AType ATFloat) = JSType JSFloatTy
482translateConstant (AType (ATInt ITChar)) = JSType JSCharTy
482translateConstant (AType (ATInt ITChar)) = JSType JSCharTy
483translateConstant PtrType = JSType JSPtrTy
483translateConstant PtrType = JSType JSPtrTy
484translateConstant Forgot = JSType JSForgotTy
484translateConstant Forgot = JSType JSForgotTy
485−translateConstant (BI i) = jsBigInt $ JSNum (JSInteger i)
485+translateConstant (BI i) = jsBigInt $ JSString (show i)
486translateConstant c =
486translateConstant c =
487 JSError $ "Unimplemented Constant: " ++ show c
487 JSError $ "Unimplemented Constant: " ++ show c
488
488