mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Enable multiple functions exposed to the host
This commit is contained in:
parent
c61b7bf2a6
commit
a9d1327dd1
7 changed files with 63 additions and 13 deletions
|
@ -3171,7 +3171,7 @@ fn finish_specialization<'a>(
|
|||
let proc_layout =
|
||||
proc_layout_for(state.procedures.keys().copied(), symbol);
|
||||
|
||||
buf.push((symbol, proc_layout));
|
||||
buf.push(("", symbol, proc_layout));
|
||||
}
|
||||
|
||||
buf.into_bump_slice()
|
||||
|
@ -3186,12 +3186,13 @@ fn finish_specialization<'a>(
|
|||
bumpalo::collections::Vec::with_capacity_in(provides.len(), arena);
|
||||
|
||||
for loc_name in provides {
|
||||
let ident_id = ident_ids.get_or_insert(loc_name.value.as_str());
|
||||
let fn_name = loc_name.value.as_str();
|
||||
let ident_id = ident_ids.get_or_insert(fn_name);
|
||||
let symbol = Symbol::new(module_id, ident_id);
|
||||
let proc_layout =
|
||||
proc_layout_for(state.procedures.keys().copied(), symbol);
|
||||
|
||||
buf.push((symbol, proc_layout));
|
||||
buf.push((fn_name, symbol, proc_layout));
|
||||
}
|
||||
|
||||
buf.into_bump_slice()
|
||||
|
|
|
@ -213,7 +213,7 @@ pub struct ParsedModule<'a> {
|
|||
#[derive(Debug)]
|
||||
pub enum EntryPoint<'a> {
|
||||
Executable {
|
||||
exposed_to_host: &'a [(Symbol, ProcLayout<'a>)],
|
||||
exposed_to_host: &'a [(&'a str, Symbol, ProcLayout<'a>)],
|
||||
platform_path: PathBuf,
|
||||
},
|
||||
Test,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue