mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
Implement saturated add/subtract
This commit is contained in:
parent
4ea91b54eb
commit
2c41c43aea
10 changed files with 177 additions and 66 deletions
|
@ -136,6 +136,7 @@ pub fn dispatch_low_level<'a>(
|
|||
},
|
||||
NumToStr => return NotImplemented,
|
||||
NumAddChecked => return NotImplemented,
|
||||
NumAddSaturated => return NotImplemented,
|
||||
NumSub => match ret_layout {
|
||||
WasmLayout::Primitive(value_type, _) => match value_type {
|
||||
I32 => code_builder.i32_sub(),
|
||||
|
@ -168,6 +169,7 @@ pub fn dispatch_low_level<'a>(
|
|||
},
|
||||
},
|
||||
NumSubChecked => return NotImplemented,
|
||||
NumSubSaturated => return NotImplemented,
|
||||
NumMul => match ret_layout {
|
||||
WasmLayout::Primitive(value_type, _) => match value_type {
|
||||
I32 => code_builder.i32_mul(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue