mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Merge pull request #3525 from rtfeldman/3522
Num.toStr for f32, f64, Dec
This commit is contained in:
commit
da7c7ac5f2
8 changed files with 159 additions and 45 deletions
|
@ -2029,15 +2029,15 @@ impl<'a> LowLevelCall<'a> {
|
|||
FloatWidth::F32 => {
|
||||
self.load_args(backend);
|
||||
backend.code_builder.f64_promote_f32();
|
||||
self.load_args_and_call_zig(backend, bitcode::STR_FROM_FLOAT);
|
||||
self.load_args_and_call_zig(backend, &bitcode::STR_FROM_FLOAT[width]);
|
||||
}
|
||||
FloatWidth::F64 => {
|
||||
self.load_args_and_call_zig(backend, bitcode::STR_FROM_FLOAT);
|
||||
self.load_args_and_call_zig(backend, &bitcode::STR_FROM_FLOAT[width]);
|
||||
}
|
||||
FloatWidth::F128 => todo!("F128 to Str"),
|
||||
},
|
||||
Layout::Builtin(Builtin::Decimal) => {
|
||||
todo!("Decimal to Str")
|
||||
self.load_args_and_call_zig(backend, bitcode::DEC_TO_STR)
|
||||
}
|
||||
x => internal_error!("NumToStr is not defined for {:?}", x),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue