You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OCaml has 31 and 63-bit signed integers - one bit (LSB) is always 1 to mark it as an integer (otherwise, it is considered to be a pointer by the GC)
OCaml also has int32 and int64 - boxed ints that are not cleared by the GC
We should want to do it without making an expensive external C call
Ideally, the compiler should spit out code to check the overflow flag (or whatever the condition would be - with calculations on the 31/63-bit ints), and throw an exception in that case.
It would get pipelined and not cause a performance hit.
The text was updated successfully, but these errors were encountered:
nikochiko
changed the title
Detect and throw IntegerOverflow with OCaml
Detect and throw Integer_overflow with OCaml
Mar 11, 2024
Notes from talking to KC:
Ideally, the compiler should spit out code to check the overflow flag (or whatever the condition would be - with calculations on the 31/63-bit ints), and throw an exception in that case.
It would get pipelined and not cause a performance hit.
The text was updated successfully, but these errors were encountered: