mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
PR tweaks
This commit is contained in:
parent
e342b21d43
commit
a07cac6682
1 changed files with 4 additions and 8 deletions
|
@ -34,8 +34,7 @@ use crate::{
|
||||||
pub enum ProcSource {
|
pub enum ProcSource {
|
||||||
Roc,
|
Roc,
|
||||||
Helper,
|
Helper,
|
||||||
/// Wrapper function for higher-order calls from Zig to Roc,
|
/// Wrapper function for higher-order calls from Zig to Roc
|
||||||
/// to work around Zig's incorrect implementation of C calling convention in Wasm
|
|
||||||
HigherOrderWrapper(usize),
|
HigherOrderWrapper(usize),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1009,16 +1008,13 @@ impl<'a> WasmBackend<'a> {
|
||||||
CallConv::C,
|
CallConv::C,
|
||||||
);
|
);
|
||||||
|
|
||||||
for (
|
for (roc_proc_index, lookup) in self.proc_lookup.iter().enumerate() {
|
||||||
roc_proc_index,
|
let ProcLookupData {
|
||||||
ProcLookupData {
|
|
||||||
name: ir_sym,
|
name: ir_sym,
|
||||||
layout: pl,
|
layout: pl,
|
||||||
linker_index: linker_sym_index,
|
linker_index: linker_sym_index,
|
||||||
..
|
..
|
||||||
},
|
} = lookup;
|
||||||
) in self.proc_lookup.iter().enumerate()
|
|
||||||
{
|
|
||||||
if *ir_sym == func_sym && pl == proc_layout {
|
if *ir_sym == func_sym && pl == proc_layout {
|
||||||
let wasm_fn_index = self.fn_index_offset + roc_proc_index as u32;
|
let wasm_fn_index = self.fn_index_offset + roc_proc_index as u32;
|
||||||
let num_wasm_args = param_types.len();
|
let num_wasm_args = param_types.len();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue