diff --git a/compiler/gen_dev/src/generic64/storage.rs b/compiler/gen_dev/src/generic64/storage.rs index 70911e77d2..ece5ea3d1c 100644 --- a/compiler/gen_dev/src/generic64/storage.rs +++ b/compiler/gen_dev/src/generic64/storage.rs @@ -900,6 +900,8 @@ impl< pub fn ret_pointer_arg(&mut self, reg: GeneralReg) { self.symbol_storage_map .insert(Symbol::RET_POINTER, Reg(General(reg))); + self.general_free_regs.retain(|x| *x != reg); + self.general_used_regs.push((reg, Symbol::RET_POINTER)); } /// updates the function call stack size to the max of its current value and the size need for this call. diff --git a/compiler/test_gen/src/gen_list.rs b/compiler/test_gen/src/gen_list.rs index 4fbe60537d..d7e238605f 100644 --- a/compiler/test_gen/src/gen_list.rs +++ b/compiler/test_gen/src/gen_list.rs @@ -19,7 +19,7 @@ use indoc::indoc; use roc_std::{RocList, RocStr}; #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn roc_list_construction() { let list = RocList::from_slice(&[1i64; 23]); assert_eq!(&list, &list); diff --git a/compiler/test_gen/src/gen_records.rs b/compiler/test_gen/src/gen_records.rs index 5377da5afc..baa3675acd 100644 --- a/compiler/test_gen/src/gen_records.rs +++ b/compiler/test_gen/src/gen_records.rs @@ -272,7 +272,7 @@ fn empty_record() { ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn i64_record2_literal() { assert_evals_to!( indoc!( @@ -299,7 +299,7 @@ fn i64_record2_literal() { // ); // } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn f64_record2_literal() { assert_evals_to!( indoc!( @@ -401,7 +401,7 @@ fn bool_literal() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn return_record() { assert_evals_to!( indoc!( @@ -652,7 +652,7 @@ fn optional_field_empty_record() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn return_record_2() { assert_evals_to!( indoc!( @@ -666,7 +666,7 @@ fn return_record_2() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn return_record_3() { assert_evals_to!( indoc!( @@ -680,7 +680,7 @@ fn return_record_3() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn return_record_4() { assert_evals_to!( indoc!( @@ -694,7 +694,7 @@ fn return_record_4() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn return_record_5() { assert_evals_to!( indoc!( @@ -708,7 +708,7 @@ fn return_record_5() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn return_record_6() { assert_evals_to!( indoc!( @@ -722,7 +722,7 @@ fn return_record_6() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn return_record_7() { assert_evals_to!( indoc!( @@ -792,7 +792,7 @@ fn return_record_float_float_float() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn return_nested_record() { assert_evals_to!( indoc!( diff --git a/compiler/test_gen/src/gen_tags.rs b/compiler/test_gen/src/gen_tags.rs index 759242c91d..7d54bd9cbb 100644 --- a/compiler/test_gen/src/gen_tags.rs +++ b/compiler/test_gen/src/gen_tags.rs @@ -314,7 +314,7 @@ fn gen_if_float() { ); } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn when_on_nothing() { assert_evals_to!( indoc!( @@ -333,7 +333,7 @@ fn when_on_nothing() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn when_on_just() { assert_evals_to!( indoc!( @@ -352,7 +352,7 @@ fn when_on_just() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn when_on_result() { assert_evals_to!( indoc!( @@ -371,7 +371,7 @@ fn when_on_result() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn when_on_these() { assert_evals_to!( indoc!( @@ -393,7 +393,7 @@ fn when_on_these() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn match_on_two_values() { // this will produce a Chain internally assert_evals_to!( @@ -410,7 +410,7 @@ fn match_on_two_values() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn pair_with_underscore() { assert_evals_to!( indoc!( @@ -427,7 +427,7 @@ fn pair_with_underscore() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn result_with_underscore() { // This test revealed an issue with hashing Test values assert_evals_to!(