mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
get runtime representation within a pointer instead of of pointers to correctly find refcount functions
This commit is contained in:
parent
a8bef30392
commit
0f7964cc9c
1 changed files with 12 additions and 6 deletions
|
@ -2113,13 +2113,19 @@ impl<'a, 'r> WasmBackend<'a, 'r> {
|
|||
layout: InLayout<'a>,
|
||||
op: HelperOp,
|
||||
) -> u32 {
|
||||
let layout_repr = if op.is_indirect() {
|
||||
LayoutRepr::Ptr(layout)
|
||||
} else {
|
||||
self.layout_interner.runtime_representation(layout)
|
||||
let layout_repr = self.layout_interner.runtime_representation(layout);
|
||||
let same_layout = |layout| {
|
||||
if op.is_indirect() {
|
||||
if let LayoutRepr::Ptr(inner) = self.layout_interner.runtime_representation(layout)
|
||||
{
|
||||
self.layout_interner.runtime_representation(inner) == layout_repr
|
||||
} else {
|
||||
false
|
||||
}
|
||||
} else {
|
||||
self.layout_interner.runtime_representation(layout) == layout_repr
|
||||
}
|
||||
};
|
||||
let same_layout =
|
||||
|layout| self.layout_interner.runtime_representation(layout) == layout_repr;
|
||||
let proc_index = self
|
||||
.proc_lookup
|
||||
.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue