add example with arguments

This commit is contained in:
Folkert 2023-04-02 22:06:04 +02:00
parent 3ff17aa0ea
commit 38566a2b9f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
18 changed files with 286 additions and 129 deletions

View file

@ -380,11 +380,8 @@ pub fn load_types(
// Get the variables for all the exposed_to_host symbols
let variables = (0..decls.len()).filter_map(|index| {
if exposed_to_host.contains_key(&decls.symbols[index].value) {
Some(decls.variables[index])
} else {
None
}
let symbol = decls.symbols[index].value;
exposed_to_host.get(&symbol).copied()
});
let operating_system = target_info.operating_system;
@ -456,7 +453,6 @@ pub fn load_types(
let types = Types::new_with_entry_points(
arena,
subs,
variables.clone(),
arena.alloc(interns),
glue_procs_by_layout,
layout_cache,