mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Merge remote-tracking branch 'origin/trunk' into list-str-capacity
This commit is contained in:
commit
6134e57921
151 changed files with 8702 additions and 2006 deletions
|
@ -6606,7 +6606,13 @@ fn build_int_binop<'a, 'ctx, 'env>(
|
|||
NumGte => bd.build_int_compare(SGE, lhs, rhs, "int_gte").into(),
|
||||
NumLt => bd.build_int_compare(SLT, lhs, rhs, "int_lt").into(),
|
||||
NumLte => bd.build_int_compare(SLE, lhs, rhs, "int_lte").into(),
|
||||
NumRemUnchecked => bd.build_int_signed_rem(lhs, rhs, "rem_int").into(),
|
||||
NumRemUnchecked => {
|
||||
if int_width.is_signed() {
|
||||
bd.build_int_signed_rem(lhs, rhs, "rem_int").into()
|
||||
} else {
|
||||
bd.build_int_unsigned_rem(lhs, rhs, "rem_uint").into()
|
||||
}
|
||||
}
|
||||
NumIsMultipleOf => {
|
||||
// this builds the following construct
|
||||
//
|
||||
|
@ -6680,7 +6686,13 @@ fn build_int_binop<'a, 'ctx, 'env>(
|
|||
&[lhs.into(), rhs.into()],
|
||||
&bitcode::NUM_POW_INT[int_width],
|
||||
),
|
||||
NumDivUnchecked => bd.build_int_signed_div(lhs, rhs, "div_int").into(),
|
||||
NumDivUnchecked => {
|
||||
if int_width.is_signed() {
|
||||
bd.build_int_signed_div(lhs, rhs, "div_int").into()
|
||||
} else {
|
||||
bd.build_int_unsigned_div(lhs, rhs, "div_uint").into()
|
||||
}
|
||||
}
|
||||
NumDivCeilUnchecked => call_bitcode_fn(
|
||||
env,
|
||||
&[lhs.into(), rhs.into()],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue