remove clone

This commit is contained in:
Folkert 2024-06-29 13:31:54 +02:00
parent 413d6621c0
commit 14b02c5827
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 12 additions and 18 deletions

View file

@ -32,16 +32,10 @@ pub fn insert_inc_dec_operations<'a>(
layout_interner: &STLayoutInterner<'a>,
procedures: &mut HashMap<(Symbol, ProcLayout<'a>), Proc<'a>, BuildHasherDefault<WyHash>>,
) {
// TODO remove this clone?
let ps = arena.alloc(procedures.clone());
let borrow_signatures = crate::borrow::infer_borrow_signatures(arena, layout_interner, ps);
let borrow_signatures =
crate::borrow::infer_borrow_signatures(arena, layout_interner, &procedures);
let borrow_signatures = arena.alloc(borrow_signatures);
// for ((s, _), sig) in borrow_signatures.procs.iter() {
// dbg!((s, sig));
// }
// All calls to lowlevels are wrapped in another function to help with type inference and return/parameter layouts.
// But this lowlevel might get inlined into the caller of the wrapper and thus removing any reference counting operations.
// Thus, these rc operations are performed on the caller of the wrapper instead, and we skip rc on the lowlevel.