mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
attempt to correct list refcount generation in dev backends
This commit is contained in:
parent
94fe0820d5
commit
36bc8bfac4
9 changed files with 56 additions and 24 deletions
|
@ -368,6 +368,17 @@ impl<'a> LowLevelCall<'a> {
|
|||
backend.call_host_fn_after_loading_args(bitcode::LIST_DECREF);
|
||||
}
|
||||
|
||||
ListElemDecFnPtr => {
|
||||
let input_list: Symbol = self.arguments[0];
|
||||
let list_layout = backend
|
||||
.layout_interner
|
||||
.get_repr(backend.storage.symbol_layouts[&input_list]);
|
||||
let elem_in_layout = unwrap_list_elem_layout(list_layout);
|
||||
let dec_fn_ptr = build_refcount_element_fn(backend, elem_in_layout, HelperOp::Dec);
|
||||
|
||||
backend.code_builder.i32_const(dec_fn_ptr);
|
||||
}
|
||||
|
||||
ListMap | ListMap2 | ListMap3 | ListMap4 | ListSortWith => {
|
||||
internal_error!("HigherOrder lowlevels should not be handled here")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue