This commit is contained in:
Folkert 2022-12-09 15:57:50 +01:00
parent 19aa3ade45
commit 30ce1ad4bb
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -267,22 +267,22 @@ where
captures_niche: CapturesNiche::no_niche(), captures_niche: CapturesNiche::no_niche(),
}; };
let mut env = Env::new(arena);
let host_exposed: Vec<_> = symbols let host_exposed: Vec<_> = symbols
.iter() .iter()
.map(|symbol| { .map(|symbol| {
let bytes = func_name_bytes_help( (
func_name_bytes_help(
*symbol, *symbol,
[], [],
CapturesNiche::no_niche(), CapturesNiche::no_niche(),
&layout.result, &layout.result,
); ),
[].as_slice(),
(bytes, [].as_slice()) )
}) })
.collect(); .collect();
let mut env = Env::new(arena);
let entry_point_function = let entry_point_function =
build_entry_point(&mut env, interner, layout, None, &host_exposed)?; build_entry_point(&mut env, interner, layout, None, &host_exposed)?;
@ -327,22 +327,11 @@ where
let mut p = ProgramBuilder::new(); let mut p = ProgramBuilder::new();
p.add_mod(MOD_APP, main_module)?; p.add_mod(MOD_APP, main_module)?;
match entry_point {
EntryPoint::Single { .. } => {
p.add_entry_point( p.add_entry_point(
EntryPointName(ENTRY_POINT_NAME), EntryPointName(ENTRY_POINT_NAME),
MOD_APP, MOD_APP,
FuncName(ENTRY_POINT_NAME), FuncName(ENTRY_POINT_NAME),
)?; )?;
}
EntryPoint::Expects { .. } => {
p.add_entry_point(
EntryPointName(ENTRY_POINT_NAME),
MOD_APP,
FuncName(ENTRY_POINT_NAME),
)?;
}
}
p.build()? p.build()?
}; };