diff --git a/crates/compiler/alias_analysis/src/lib.rs b/crates/compiler/alias_analysis/src/lib.rs index 5182ea9bad..0cc72cb35c 100644 --- a/crates/compiler/alias_analysis/src/lib.rs +++ b/crates/compiler/alias_analysis/src/lib.rs @@ -238,38 +238,7 @@ where } match entry_point { - EntryPoint::Single(SingleEntryPoint { - name: entry_point_name, - symbol: entry_point_symbol, - layout: entry_point_layout, - }) => { - // the entry point wrapper - let roc_main_bytes = func_name_bytes_help( - entry_point_symbol, - entry_point_layout.arguments.iter().copied(), - Niche::NONE, - entry_point_layout.result, - ); - let roc_main = FuncName(&roc_main_bytes); - - let mut env = Env::new(); - - let entry_point_function = build_entry_point( - &mut env, - interner, - entry_point_layout, - Some(roc_main), - &host_exposed_functions, - &erased_functions, - )?; - - type_definitions.extend(env.type_names); - - entry_point_names.push(entry_point_name.as_bytes()); - let entry_point_name = FuncName(entry_point_name.as_bytes()); - m.add_func(entry_point_name, entry_point_function)?; - } - EntryPoint::Multiple(entry_points) => { + EntryPoint::Program(entry_points) => { for SingleEntryPoint { name: entry_point_name, symbol: entry_point_symbol, diff --git a/crates/compiler/build/src/program.rs b/crates/compiler/build/src/program.rs index 6ed1b1ea78..45289566ba 100644 --- a/crates/compiler/build/src/program.rs +++ b/crates/compiler/build/src/program.rs @@ -237,7 +237,7 @@ fn gen_from_mono_module_llvm<'a>( }) .collect_in(arena); - roc_mono::ir::EntryPoint::Multiple(entry_points.into_bump_slice()) + roc_mono::ir::EntryPoint::Program(entry_points.into_bump_slice()) } EntryPoint::Test => roc_mono::ir::EntryPoint::Expects { symbols: &[] }, }; diff --git a/crates/compiler/gen_llvm/src/llvm/build.rs b/crates/compiler/gen_llvm/src/llvm/build.rs index 79cc09f19e..c9f4359e65 100644 --- a/crates/compiler/gen_llvm/src/llvm/build.rs +++ b/crates/compiler/gen_llvm/src/llvm/build.rs @@ -5592,7 +5592,7 @@ pub fn build_wasm_test_wrapper<'a, 'ctx>( opt_level, procedures, vec![], - EntryPoint::Single(entry_point), + EntryPoint::Program(env.arena.alloc([entry_point])), Some(&std::env::temp_dir().join("test.ll")), ); @@ -5619,7 +5619,7 @@ pub fn build_procedures_return_main<'a, 'ctx>( opt_level, procedures, host_exposed_lambda_sets, - EntryPoint::Single(entry_point), + EntryPoint::Program(env.arena.alloc([entry_point])), Some(&std::env::temp_dir().join("test.ll")), ); diff --git a/crates/compiler/mono/src/ir.rs b/crates/compiler/mono/src/ir.rs index bfb9fcbb3c..d8b23ad23d 100644 --- a/crates/compiler/mono/src/ir.rs +++ b/crates/compiler/mono/src/ir.rs @@ -139,8 +139,7 @@ pub struct SingleEntryPoint<'a> { #[derive(Debug, Clone, Copy)] pub enum EntryPoint<'a> { - Single(SingleEntryPoint<'a>), - Multiple(&'a [SingleEntryPoint<'a>]), + Program(&'a [SingleEntryPoint<'a>]), Expects { symbols: &'a [Symbol] }, }