Merge pull request #5093 from roc-lang/glue-getters-rtfeldman

Glue for functions and closures
This commit is contained in:
Richard Feldman 2023-03-21 08:12:19 -04:00 committed by GitHub
commit 2276c78d9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 3864 additions and 1101 deletions

View file

@ -103,7 +103,7 @@ pub fn helper(
// println!("=================================\n");
}
debug_assert_eq!(exposed_to_host.values.len(), 1);
debug_assert_eq!(exposed_to_host.top_level_values.len(), 1);
let entry_point = match loaded.entry_point {
EntryPoint::Executable {
exposed_to_host,
@ -188,7 +188,7 @@ pub fn helper(
let env = roc_gen_dev::Env {
arena,
module_id,
exposed_to_host: exposed_to_host.values.keys().copied().collect(),
exposed_to_host: exposed_to_host.top_level_values.keys().copied().collect(),
lazy_literals,
generate_allocators: true, // Needed for testing, since we don't have a platform
};

View file

@ -114,10 +114,10 @@ fn compile_roc_to_wasm_bytes<'a, T: Wasm32Result>(
..
} = loaded;
debug_assert_eq!(exposed_to_host.values.len(), 1);
debug_assert_eq!(exposed_to_host.top_level_values.len(), 1);
let exposed_to_host = exposed_to_host
.values
.top_level_values
.keys()
.copied()
.collect::<MutSet<_>>();