generate indirect refcount calls in wasm backend

This commit is contained in:
Brendan Hansknecht 2024-07-10 17:19:51 -07:00
parent 0ad638b17d
commit 927eff0bf4
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
3 changed files with 52 additions and 23 deletions

View file

@ -2102,7 +2102,11 @@ impl<'a, 'r> WasmBackend<'a, 'r> {
self.register_helper_proc(spec_sym, spec_layout, ProcSource::Helper);
}
let layout_repr = self.layout_interner.runtime_representation(layout);
let layout_repr = if op.is_indirect() {
LayoutRepr::Ptr(layout)
} else {
self.layout_interner.runtime_representation(layout)
};
let same_layout =
|layout| self.layout_interner.runtime_representation(layout) == layout_repr;
let proc_index = self