Rename float functions and vars

This commit is contained in:
Mfon Eti-mfon 2022-05-08 18:42:12 +01:00
parent de7fe31289
commit 9068c2414e
No known key found for this signature in database
GPG key ID: C79D87B2D3688E26
21 changed files with 242 additions and 242 deletions

View file

@ -5696,7 +5696,7 @@ fn run_low_level<'a, 'ctx, 'env>(
}
}
NumAbs | NumNeg | NumRound | NumSqrtUnchecked | NumLogUnchecked | NumSin | NumCos
| NumCeiling | NumFloor | NumToFloat | NumIsFinite | NumAtan | NumAcos | NumAsin
| NumCeiling | NumFloor | NumToFrac | NumIsFinite | NumAtan | NumAcos | NumAsin
| NumToIntChecked => {
debug_assert_eq!(args.len(), 1);
@ -7161,7 +7161,7 @@ fn build_int_unary_op<'a, 'ctx, 'env>(
// integer abs overflows when applied to the minimum value of a signed type
int_abs_raise_on_overflow(env, arg, arg_int_type)
}
NumToFloat => {
NumToFrac => {
// This is an Int, so we need to convert it.
let target_float_type = match return_layout {
@ -7375,7 +7375,7 @@ fn build_float_unary_op<'a, 'ctx, 'env>(
NumAbs => env.call_intrinsic(&LLVM_FABS[float_width], &[arg.into()]),
NumSqrtUnchecked => env.call_intrinsic(&LLVM_SQRT[float_width], &[arg.into()]),
NumLogUnchecked => env.call_intrinsic(&LLVM_LOG[float_width], &[arg.into()]),
NumToFloat => {
NumToFrac => {
let return_width = match layout {
Layout::Builtin(Builtin::Float(return_width)) => *return_width,
_ => internal_error!("Layout for returning is not Float : {:?}", layout),
@ -7397,10 +7397,10 @@ fn build_float_unary_op<'a, 'ctx, 'env>(
(FloatWidth::F64, FloatWidth::F64) => arg.into(),
(FloatWidth::F128, FloatWidth::F128) => arg.into(),
(FloatWidth::F128, _) => {
unimplemented!("I cannot handle F128 with Num.toFloat yet")
unimplemented!("I cannot handle F128 with Num.toFrac yet")
}
(_, FloatWidth::F128) => {
unimplemented!("I cannot handle F128 with Num.toFloat yet")
unimplemented!("I cannot handle F128 with Num.toFrac yet")
}
}
}