wasm: generate code for ZigCC wrapper function

This commit is contained in:
Brian Carroll 2022-03-26 08:21:08 +00:00
parent 973d6dc41f
commit ff9bbfab63
4 changed files with 193 additions and 6 deletions

View file

@ -170,7 +170,7 @@ pub fn build_module_without_wrapper<'a>(
env.arena,
);
let mut helper_iter = helper_procs.iter();
for source in sources {
for (idx, source) in sources.iter().enumerate() {
use ProcSource::*;
match source {
Roc => { /* already generated */ }
@ -179,9 +179,7 @@ pub fn build_module_without_wrapper<'a>(
backend.build_proc(proc);
}
}
ZigCallConvWrapper => {
todo!("Generate Wasm wrapper to convert from Zig CC to CCC");
}
ZigCallConvWrapper(inner_idx) => backend.build_zigcc_wrapper(idx, *inner_idx),
}
}