cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.45k stars 159 forks source link

Request for support of 64bit logical operations #779

Open anandbabu141 opened 2 months ago

anandbabu141 commented 2 months ago

The int and long in java are getting converted to number in javascript. The number is using 64 bit floating point format resulting in loss of precision. And the only the lower 32 bit number is considered for operations like & (AND) or << LEFTSHIFT in case of number datatype. The java code I am dealing with has a complex validation logic and am trying to port to javascript using jsweet. I had to manuallly modify the & and << operations using BigInt.

This is not a urgent requirement. Thanks to jsweet that eased my porting work.