Pass 1 of polymorphic specialization of defs

This commit is contained in:
Ayaz Hafiz 2022-04-25 18:59:39 -04:00
parent 293bc6b15b
commit 7182180622
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
5 changed files with 309 additions and 257 deletions

View file

@ -612,15 +612,12 @@ fn i64_abs() {
#[test]
#[cfg(any(feature = "gen-llvm"))]
#[should_panic(
expected = r#"Roc failed with message: "integer absolute overflowed because its argument is the minimum value"#
)]
fn abs_min_int_overflow() {
assert_evals_to!(
indoc!(
r#"
Num.abs Num.minI64
"#
Num.abs Num.minI64
"#
),
0,
i64
@ -3072,7 +3069,7 @@ fn sub_saturated() {
#[test]
#[cfg(any(feature = "gen-llvm"))]
fn monomorphized_ints() {
fn monomorphized_ints1() {
assert_evals_to!(
indoc!(
r#"

View file

@ -1319,7 +1319,7 @@ fn monomorphized_applied_tag() {
#[test]
#[cfg(any(feature = "gen-llvm"))]
fn monomorphized_tag_with_polymorphic_arg() {
fn monomorphized_tag_with_polymorphic_arg1() {
assert_evals_to!(
indoc!(
r#"

View file

@ -240,6 +240,9 @@ fn create_llvm_module<'a>(
// Uncomment this to see the module's optimized LLVM instruction output:
// env.module.print_to_stderr();
env.module
.print_to_file(&std::path::PathBuf::from("/tmp/out.ll"))
.unwrap();
(main_fn_name, delayed_errors.join("\n"), env.module)
}