hook up polymorphic zig builtins

This commit is contained in:
Folkert 2021-10-20 16:43:39 +02:00
parent ab34c2a55e
commit 63b1aaad4e
5 changed files with 114 additions and 94 deletions

View file

@ -3,7 +3,7 @@
#![allow(clippy::large_enum_variant, clippy::upper_case_acronyms)]
use bumpalo::{collections::Vec, Bump};
use roc_builtins::bitcode;
use roc_builtins::bitcode::{self, IntWidth};
use roc_collections::all::{MutMap, MutSet};
use roc_module::ident::{ModuleName, TagName};
use roc_module::low_level::LowLevel;
@ -400,21 +400,21 @@ where
}
LowLevel::NumAcos => self.build_fn_call(
sym,
format!("{}_i64", bitcode::NUM_ACOS),
bitcode::NUM_ACOS[IntWidth::I64].to_string(),
args,
arg_layouts,
ret_layout,
),
LowLevel::NumAsin => self.build_fn_call(
sym,
format!("{}_i64", bitcode::NUM_ASIN),
bitcode::NUM_ASIN[IntWidth::I64].to_string(),
args,
arg_layouts,
ret_layout,
),
LowLevel::NumAtan => self.build_fn_call(
sym,
format!("{}_i64", bitcode::NUM_ATAN),
bitcode::NUM_ATAN[IntWidth::I64].to_string(),
args,
arg_layouts,
ret_layout,
@ -437,7 +437,7 @@ where
}
LowLevel::NumPowInt => self.build_fn_call(
sym,
format!("{}_i64", bitcode::NUM_POW_INT),
bitcode::NUM_POW_INT[IntWidth::I64].to_string(),
args,
arg_layouts,
ret_layout,
@ -473,7 +473,7 @@ where
}
LowLevel::NumRound => self.build_fn_call(
sym,
bitcode::NUM_ROUND.to_string(),
bitcode::NUM_ROUND[IntWidth::I64].to_string(),
args,
arg_layouts,
ret_layout,