wasm: code gen for higher order wrapper function

This commit is contained in:
Brian Carroll 2022-04-02 00:29:32 +01:00
parent 51789f38c2
commit 5db3ae0227
5 changed files with 124 additions and 174 deletions

View file

@ -174,12 +174,8 @@ pub fn build_module_without_wrapper<'a>(
use ProcSource::*;
match source {
Roc => { /* already generated */ }
Helper => {
if let Some(proc) = helper_iter.next() {
backend.build_proc(proc);
}
}
HigherOrderWrapper(inner_idx) => backend.build_zigcc_wrapper(idx, *inner_idx),
Helper => backend.build_proc(helper_iter.next().unwrap()),
HigherOrderWrapper(inner_idx) => backend.build_higher_order_wrapper(idx, *inner_idx),
}
}