mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Merge branch 'trunk' into improve-dependency-solving
This commit is contained in:
commit
d9827ae467
2 changed files with 9 additions and 4 deletions
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
mod libm;
|
mod libm;
|
||||||
|
|
||||||
/// TODO replace this with a normal Inkwell build_cast call - this was just
|
/// TODO this is no longer used. Feel free to delete it the next time
|
||||||
/// used as a proof of concept for getting bitcode importing working!
|
/// we need to rebuild builtins.bc!
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn i64_to_f64_(num: i64) -> f64 {
|
pub fn i64_to_f64_(num: i64) -> f64 {
|
||||||
num as f64
|
num as f64
|
||||||
|
|
|
@ -2610,8 +2610,13 @@ fn build_int_unary_op<'a, 'ctx, 'env>(
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
NumToFloat => {
|
NumToFloat => {
|
||||||
// TODO specialize this to be not just for i64!
|
// This is an Int, so we need to convert it.
|
||||||
call_bitcode_fn(NumToFloat, env, &[arg.into()], "i64_to_f64_")
|
bd.build_cast(
|
||||||
|
InstructionOpcode::SIToFP,
|
||||||
|
arg,
|
||||||
|
env.context.f64_type(),
|
||||||
|
"i64_to_f64",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
unreachable!("Unrecognized int unary operation: {:?}", op);
|
unreachable!("Unrecognized int unary operation: {:?}", op);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue