From c6f1edbf47bd37f3743105c59ce13c1aee27b6cc Mon Sep 17 00:00:00 2001 From: Brendan Hansknecht Date: Sat, 19 Feb 2022 19:24:37 -0800 Subject: [PATCH] load literals that are union args --- compiler/gen_dev/src/lib.rs | 1 + compiler/test_gen/src/gen_tags.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/compiler/gen_dev/src/lib.rs b/compiler/gen_dev/src/lib.rs index 4822315460..f72963cd5a 100644 --- a/compiler/gen_dev/src/lib.rs +++ b/compiler/gen_dev/src/lib.rs @@ -335,6 +335,7 @@ trait Backend<'a> { arguments, .. } => { + self.load_literal_symbols(arguments); self.tag(sym, &arguments, tag_layout, *tag_id); } x => todo!("the expression, {:?}", x), diff --git a/compiler/test_gen/src/gen_tags.rs b/compiler/test_gen/src/gen_tags.rs index c1643ecc9a..759242c91d 100644 --- a/compiler/test_gen/src/gen_tags.rs +++ b/compiler/test_gen/src/gen_tags.rs @@ -1,8 +1,8 @@ #[cfg(feature = "gen-llvm")] use crate::helpers::llvm::assert_evals_to; -// #[cfg(feature = "gen-dev")] -// use crate::helpers::dev::assert_evals_to; +#[cfg(feature = "gen-dev")] +use crate::helpers::dev::assert_evals_to; #[cfg(feature = "gen-wasm")] use crate::helpers::wasm::assert_evals_to; @@ -29,7 +29,7 @@ fn width_and_alignment_u8_u8() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn applied_tag_nothing_ir() { assert_evals_to!( indoc!( @@ -49,7 +49,7 @@ fn applied_tag_nothing_ir() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn applied_tag_nothing() { assert_evals_to!( indoc!( @@ -69,7 +69,7 @@ fn applied_tag_nothing() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn applied_tag_just() { assert_evals_to!( indoc!( @@ -88,7 +88,7 @@ fn applied_tag_just() { } #[test] -#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] +#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] fn applied_tag_just_ir() { assert_evals_to!( indoc!(