mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Pass 1 of polymorphic specialization of defs
This commit is contained in:
parent
293bc6b15b
commit
7182180622
5 changed files with 309 additions and 257 deletions
|
@ -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#"
|
||||
|
|
|
@ -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#"
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue