wasm: implement checked addition

This commit is contained in:
Brian Carroll 2022-06-20 12:50:14 +01:00
parent 76185f372d
commit 10676d3ce9
No known key found for this signature in database
GPG key ID: 9CF4E3BF9C4722C7
5 changed files with 47 additions and 4 deletions

View file

@ -109,6 +109,8 @@ comptime {
num.exportRoundF32(FROM, ROC_BUILTINS ++ "." ++ NUM ++ ".round_f32.");
num.exportRoundF64(FROM, ROC_BUILTINS ++ "." ++ NUM ++ ".round_f64.");
num.exportAddWithOverflow(FROM, ROC_BUILTINS ++ "." ++ NUM ++ ".add_with_overflow.");
}
inline for (FLOATS) |T| {
@ -122,6 +124,8 @@ comptime {
num.exportPow(T, ROC_BUILTINS ++ "." ++ NUM ++ ".pow.");
num.exportLog(T, ROC_BUILTINS ++ "." ++ NUM ++ ".log.");
num.exportAddWithOverflow(T, ROC_BUILTINS ++ "." ++ NUM ++ ".add_with_overflow.");
num.exportIsFinite(T, ROC_BUILTINS ++ "." ++ NUM ++ ".is_finite.");
}
}