mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
wasm: code gen for higher order wrapper function
This commit is contained in:
parent
51789f38c2
commit
5db3ae0227
5 changed files with 124 additions and 174 deletions
|
@ -1042,15 +1042,13 @@ pub fn call_higher_order_lowlevel<'a>(
|
|||
cb.i32_const(elem_old_size as i32);
|
||||
cb.i32_const(elem_new_size as i32);
|
||||
|
||||
let (proc_index, lookup) = backend
|
||||
.proc_lookup
|
||||
.iter()
|
||||
.enumerate()
|
||||
.find(|(_, lookup)| lookup.name == Symbol::LIST_MAP)
|
||||
.unwrap_or_else(|| panic!("Can't find {:?}", op));
|
||||
let wasm_fn_index = backend.fn_index_offset + proc_index as u32;
|
||||
|
||||
cb.call(wasm_fn_index, lookup.linker_index, 9, false);
|
||||
let num_wasm_args = 9;
|
||||
let has_return_val = false;
|
||||
backend.call_zig_builtin_after_loading_args(
|
||||
bitcode::LIST_MAP,
|
||||
num_wasm_args,
|
||||
has_return_val,
|
||||
);
|
||||
}
|
||||
|
||||
ListMap2 { .. }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue